ã¢ãã«è¨è¨æã®è¦ç´ã決ãã
ããã¾ã§ä¸ç·ã«ä»äºãããçµé¨ã®ç¡ãæ°ããã¡ã³ãã¼ã¨ä¸ç·ã«ä»äºããäºã«ãªã£ãã®ã§ã
è¦ç´ã決å®ãã¦ã¿ãã
ã¨ããããã¢ãã«è¨è¨ããã¿ããªã§åãæãã£ãã®ã§ããã®æã«æ±ºããã
- ååã¯ã:name, :tel çãåç´ã«ãããã¢ãã«åã¨éè¤ãããªãã
- Railsã®è¦ç´ã«å¾ã£ã¦ãã¢ãã«ã¯åæ°ç³»/ãã¼ãã«ã¯è¤æ°å½¢
- set_field_namesã§ãã«ã©ã ã«å¯¾å¿ããæ¥æ¬èªåãã¤ããã
- t.timestampsã§ãcreated_at,updated_atã¯å¿ ãã¤ããã
- ãã¹ããã¡ã¤ã«ãå¿ ãã³ãããããã
- migrationãã¡ã¤ã«ã¯ãdownãæ¸ãäº
- å称ã¯çç¥ããªãã
ããããã®è¦ç´ã®ç®ç
ååã¯ã:name, :tel çãåç´ã«ãããã¢ãã«åã¨éè¤ãããªãã
ä¾ãã°Systemã¢ãã«ã®å
é¨ã«ã·ã¹ãã åãæã¨ãã¨ãã¦System.system_nameã®ããã«
éè¤ãã¦ã¢ã¯ã»ã¹ãããããªããåé·ãªè¨è¿°ã«ãªã£ã¡ããã¨ããã®ãä¸çªã
å¾ãã¡ã¿ããã°ã©ã çã«ãModel.nameã§ã¢ã¯ã»ã¹ã§ããã¨å¾ã
å
¨ä½ã¸ã®å¤æ´ãããããã¨ããäºãã
Railsã®è¦ç´ã«å¾ã£ã¦ãã¢ãã«ã¯åæ°ç³»/ãã¼ãã«ã¯è¤æ°å½¢
railsã§ä½ã£ã¦ããã ããrailsã®è¦ç´ã¯å®ãããï¼ã¨ãã話ãå½ããåã ããã
set_field_namesã§ãã«ã©ã ã«å¯¾å¿ããæ¥æ¬èªåãã¤ããã
ActiveHeartは使わないで下さいã£ã¦ãããã©ãä»åã¯ã¢ãã«å³ã常ã«ã·ã¹ãã ããä½ããããªã¼ã¨æã£ã¦ãã®ã§ã
set_field_namesãrailroadã§èªã¿è¾¼ãæ§ã«ãrailroadã¡ãã£ã¨æ¹é ãããããªã¨ã
t.timestampsã§ãcreated_at,updated_atã¯å¿ ãã¤ããã
å¤å°é
ããªãããç¥ããªãã®ã§ãè¦ããªããã¼ãã«ã¯è¦ããªãã£ã¦ã¡ããã¨ããã¹ããªãã ãã©ã
大ä½ã®å ´åãå¿
è¦ãªãã¼ãã«ããæãã¦ãäºãå¤ãã®ã§â¦â¦ã
ãã¹ããã¡ã¤ã«ãå¿ ãã³ãããããã
svn addãããã¹ããã¡ã¤ã«æãã¦ã¦å¾ããç¨æããã®ããã©ãããã®ã§ã
ã¡ããã¨æèãã¦ãã¼ã¨ã
migrationãã¡ã¤ã«ã¯ãdownãæ¸ãäº
ãdownãããã¼ããããã£ã¦è¨ã£ã¦ã人ãå± ãã®ã§ææåãå ¨å¡ç¨æããã£ã¦è¨ãåæãç¡ãã¨æå³ãªãã§ãããã
å称ã¯çç¥ããªãã
ã«ãåãkn_nmã¨ãkana_nmã¨ããããªãã¦kana_nameã«ãã¾ãããã¨ãã話ã
ããããããªããªã£ã¡ããã¾ããããã
ã¨ãããããã¾ã ã¾ã ææåãã¦ããã¹ãã«ã¼ã«ã¯ããã¨æããã©ãä¸å¿ãããªæãã§ã¾ã¨ãã¦è¡ã£ã¦ãã
ã¨ããããã³ã¼ãã£ã³ã°è¦ç´ã¨ãããããä½æ¥æã®æ³¨æäºé
ï½£ã«ãªã£ã¦ãæ§ãªæ°é
ãï½