ãã®3ã®ç¶ãã§ãã ãããããã®é£ç¶ããã¿ã¤ãã«ã飽ãã¾ããã®ã§ãä»åã§ç¶ãã¿ããã«æ¸ãã®ã¯çµããã§ãï¼ ååã¯Modelã§ã®å¤ãã§ãã¯ããã¼ã¿ã®åå¾ãããfindã®ã«ã¹ã¿ãã¤ãºæ¹æ³ããç´¹ä»ãã¾ããã ä»åã¯behaviorã使ã£ã¦findã®ã«ã¹ã¿ãã¤ãºãè²ã ãªModelã«é©ç¨ããæ¹æ³ã«ã¤ãã¦ã§ãã ãã®æ¹æ³ã使ãã°ãfindã®ã«ã¹ã¿ãã¤ãºãªã©ãä¸ç®æã«çµ±ä¸ã§ããã®ã§ä¾¿å©ã§ãã 1.Behaviorã使ã ã§ã¯ãBehaviorã使ã£ã¦ã¿ã¾ãããã 試ãã«ãBeforeSaveã¨ãããã®ãä½ã£ã¦ãModel::saveï¼ãã¼ã¿ã®ä¿åã§ãï¼ã®æã«æ°è¦ãã¼ã¿ãªãcreatedã«æ¥æãããã§ã«åå¨ãããã¼ã¿ã®ä¸æ¸ããªãmodifiedã«æ¥æãæ´æ°ããä»çµã¿ãä½ã£ã¦ã¿ã¾ãã behaviorã使ãããã®ã©ã¤ãã©ãªã¯ã³ãã©ã§å ¬éããã¦ãã¾ãã http://rad-dev.org/li3_behav
{{#tags}}- {{label}}
{{/tags}}