Showing validation errors inline as the user is filling out the form can lead to a better use experience. Learn how to do this using the Client Side Validations gem.
ãªããrails3.2ã§pjaxãå ¬å¼ã«ãµãã¼ãäºã ã¿ãããªè©±ãããã¦ããã©ãç®±ãéãã¦ã¿ããããã£ã½ãå·®åãã¡ãã£ã¨è¦å½ãããªãã¦ã¤ãã«ãã¨ãªã£ã¦ãã¾ã£ãã®ã§ãæ¢åã®è³ç£ã§è©¦ãã¦ã¿ããã¨ã«ãã¾ãããpjaxãã railsåãã®pjax-railsã¨ããgemãããã¾ãããåå¹´ãããã¡ã³ãããã¦ãªãã¦ä¸å®ãªã®ã§ãpjax-railsã®ãªãã§ä½¿ããã¦ãjquery-pjaxãæ®éã«ã¤ãããã¨ã«ãã¾ããjquery-pjaxã4ã¶æãããåãããªãã¿ããã§ãããã«ãã¨ãªã£ã¦ããã®ã§ããããç´°ãããã¨ã¯æ°ã«ãã¾ããã https://github.com/defunkt/jquery-pjax ãã£ããèªã¿è¾¼ãã§ãaã¿ã°ã«ã¤ãã³ãããã¤ã³ããã¾ããããå·®ãæ¿ããè¦ç´ ã«"data-pjax-container"ã¨ããå±æ§ãè¨è¿°ããã¦ããã®ã¨ãã¾ãã $("a:not([data-remote])
pjaxã¯Chris Wanstrathã«ããjQueryãã©ã°ã¤ã³ã§ãHTTPãªã¯ã¨ã¹ãã§ãã¼ã¸å ¨ä½ãåå¾ããã®ã§ã¯ãªããAJAXãªã¯ã¨ã¹ãã«ãã£ã¦ãã¼ã¸ã®ä¸é¨ãç°¡åã«æ´æ°ã§ããããã«ãã¾ãããã¢ãã¼ã¸ã§ã©ã®ããã«åä½ããããè¦ããã¨ãã§ãã¾ããããã©ã«ãã§ã¯ããã®ãã¼ã¸ã«ããããããã®ãªã³ã¯ãã¯ãªãã¯ããã¨ãã¼ã¸å ¨ä½ããªãã¼ãããã¾ããããã¯ãã¼ã¸ä¸ã®æå»è¡¨ç¤ºãå¤ãããã¨ã§ãããã¾ãããã§ãã¯ããã¯ã¹ãã¯ãªãã¯ãã¦pjaxãæå¹åããã¨ããªã³ã¯ãã¯ãªãã¯ãã¦ããã¼ã¸å ¨ä½ããªãã¼ãããããã¨ã¯ãªãæå»ãæ´æ°ããã¾ãããããã¼ã¸ã®ã¡ã¤ã³ã»ã¯ã·ã§ã³ã¯å¤åãã¾ãã pjaxã¯pushStateã使ç¨ããã®ã§ã¦ã¼ã¶ã¯AJAXãªã¯ã¨ã¹ããããã¯ã°ã©ã¦ã³ãã§çæããã¦ãããã¨ã«æ°ã¥ãã¾ãããpjaxããã¼ã¸ãæ´æ°ãããã¨ã«ã¢ãã¬ã¹ãã¼ã®URLãæ´æ°ããããã¼ã¸ã®ã¿ã¤ãã«ãå¤ãããåã®ãã¼ã¸ããã©ã¦ã¶
scaffoldã使ãã¨CRUDãæã£ããåå°ããä¸çºã§ä½ããããã§ããããããã¢ã¬ã³ã¬ãã¦å ¨ã¦ã®æä½ãAjaxåãã¦ã¿ãã®ã§ãæé ãã¾ã¨ãã¾ããã è¨äºãèªãã®ãã ããã£ã¦æ¹ã¯ã½ã¼ã¹ã³ã¼ããGitHubã§å ¬éãã¦ãã®ã§ããã¡ããã覧ãã ããã RubyãRailsãããã¾ã触ã£ãäºããªãã®ã§ãèè ã«ããããã³ãæè¿ãã¾ãã (ï½ã»Ïã»Â´) æ¦è¦ ããã㨠indexã®ç»é¢ã ãã§CRUDãã¤ã¾ãæ°è¦ä½æ (Create)ã表示 (Read)ãç·¨é (Update)ãåé¤ (Delete)ãè¡ãããããscaffoldã§ä½æãããã¡ã¤ã«ããããã¾ãã çµè« form_for()ã«remote: trueãä¸ããã ãã§ãã¨ããããAjaxåãã¾ãããã¨ã¯ãµã¼ãã¼å´ã®ã¬ã¹ãã³ã¹ã®å 容ãæ´ãã¦ãã¯ã©ã¤ã¢ã³ãå´ã§é©åã«å¦çãã¦ããã°OKã§ãã ä½æ¥ ä¸æºåï¼scaffoldã¨ãï¼ indexã«ç·¨éã
ãã¤ããã®é£²ã¿ä¼ã§ã ããã ãã¦ã§ãã®æè¡ãé²åãã¦ããã®ã ããããã£ã¨ãªã·ã£ã¬ãªã¨ããµã¤ãããã£ã¦ããããã§ãªãããï¼ << ã¨ãã話ã«ãªãã¾ãã¦ã ã ãã©ã©ããä½ãããªãã¨ãããã¨ã§ãRails3 㨠jQuery ã使ã£ã¦çµæ§ãã¸ã¡ã«ã¤ãã£ã¦ã¿ã¾ããã ï¼â»å¤§äººã®äºæ ã«ããããªã³ã¯ã¯ãããªãåé¤ãã¾ããï¼ å½åã¯ã¨ãã«ãªã·ã£ã¬ã¯å¿ è¦ãªãã®ããªã¼ã¨æã£ãã¨ããããã¾ããããããã¤ãã£ã¦ã¿ãã¨ããã£ã±ãé¸ã¹ããªããªã·ã£ã¬ãªãã¤ã®æ¹ãããããããã¨ããçµè«ã«è½ã¡çãã¾ããã ä»åã¤ãã£ãã®ã¯è©¦é¨çãªãã®ãªã®ã§ 90æ¥ééå®ã§ããå ¬éããªãã¤ããã§ãããæ¥æ¬ã®ã¨ããµã¤ããä»å¾ãã£ã¨ãªã·ã£ã¬ã«çºå±ãã¦ãããã£ããã«ãªã£ã¦ããããå¬ããã§ãã 以ä¸ããµã¤ãã®ã³ã³ã»ããã使ã£ã¦ããæè¡ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ãã **Rails3 㨠jQuery ã§çé¢ç®ã«ãªã·ã£ã¬ãªã¨ããµã¤ããã¤ãã£ã¦ã¿ã¾ãã 1
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}