You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ãµã¤ãã®æ§ç¯ãä½åã®è²©å£²ãããã°ã®æ稿ããã®ä»ã«ããã¾ãã¾ãªæ©è½ãããã¾ãã ãã°ã¤ã³ ãµã¤ããã¯ãããã éå ¬éãµã¤ã ãã®ãµã¤ãã¯ç¾å¨ãã©ã¤ãã¼ãè¨å®ã«ãªã£ã¦ãã¾ãã
ååã®ãRailsã§ã®favoriteã®URLè¨è¨ããæããããªãããããè¦ã¦ããã£ããããªã®ã§ãããããªãã¿ã¼ã³ã®URLè¨è¨ãèãã¦ã¿ãã·ãªã¼ãºããã£ã¦ã¿ããã¨æãã¾ããï¼ç¶ããã©ããã¯æªå®ï¼ ããã©ã¯Mioããã¯é¢ãã¦ãã¨ãã£ã¦ãã»ã¨ãã©åããããªãã®ã§ãããTwitterã®followã®ãããªæ©è½ãèãã¦ã¿ã¾ãã Twitterã®è¨è¨ èããåã«ãTwitterã®Webãµã¤ãã¨APIã§ã¯ãã©ãã¼é¢ä¿ã®è¨è¨ãã©ããªã£ã¦ãããåèã«è¦ã¦ã¿ã¾ãããã*1 Webãµã¤ã URL ãã©ãã¼ãã¦ãã ã¦ã¼ã¶ï¼ãã¤ã¼ãï¼ /:screen_name/following ãã©ãã¼ãã¦ãã ã¦ã¼ã¶ /:screen_name/following/people ãã©ãã¼ããã¦ãã ã¦ã¼ã¶ /:screen_name/followers API*2 URL 追å ãã©ã¡ã¼ã¿ ãã©ãã¼ãã¦ãã ã¦ã¼ã¶ï¼IDï¼
ä»ã¾ã§ããããã«ãã¦ãããã«ã¼ãè¨å®ãã§ã¯ããããRails2.0ããã¯é¿ãã¦éããã¨ãã§ããªã*1ã¨ä»æ´ãªããæãç´ãããããã試ãã¦ã¿ãã以ä¸ã¯ãã®å®é¨çµæã åºæ¬ 追å ãªãã·ã§ã³ãªãã®åºæ¬ã«ã¼ãè¨å®map.resources :slipsã«ãã£ã¦ã以ä¸ã®ã«ã¼ãè¦åãçæãããã ã«ã¼ãè¦åã¯ä¸ã«ãããã®ãåªå ãããã .:formatãä»å±ããå¶æ°No.ã®è¡ã¯ãhttp://XXXX.XXX/slips.xmlçã®æ¡å¼µåä»ãã®ãªã¯ã¨ã¹ãããrespond_toãããã¯ã§é©åã«å¦çããããã«åå¨ããã # ã«ã¼ãè¨å®: config/routes.rb ActionController::Routing::Routes.draw do |map| map.resources :slips end No. ååä»ãã«ã¼ãå ã¡ã½ãã URLãã¹æ¸å¼ å¦çãããã³ã³ããã¼ã©ã¼ãã¢ã¯ã·ã§ã³
Rails 3ã®ã«ã¼ãã£ã³ã°ã§æ°ã«ãªã£ãã¨ããã«ã¤ãã¦ããã¤ãã®ã¡ã¢ã§ããããã¾ã§æ°ã«ãªã£ãã¨ãããªã®ã§å ¨é¨ç¶²ç¾ ãã¦ããããã§ã¯ããã¾ããããããããã åºæ¬å½¢ map.connect ãã match ã¡ã½ããã«å¤æ´ããªãã·ã§ã³ãä¸è¨ã®ããã«å¤æ´ã # Rails 2 map.connect 'products/:id', :controller => 'products', :action => 'view' # Rails 3 match 'products/:id', :to => 'catalog#view' # :to ã¯çç¥å¯è½ match "/account" => "account#index" # :controller/:action å½¢å¼ã§ããã°ããã«çç¥å¯è½ match "account/overview" Named Routes asãªãã·ã§ã³ã§æå®ããããã«
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}