class Member < ActiveRecord::Base has_one :favorite end class Favorite < ActiveRecord::Base belongs_to :member end has_one ã§é¢é£ãå®ç¾©ããã¨ã以ä¸ã®ã¡ã½ãããèªåçã«å®ç¾©ããã¾ãã(belongs_to å´ã«ãåæ§ã®ã¡ã½ãããå®ç¾©ããã¾ã)ã (é¢é£å)(force_reload = false) : é¢é£ãããªãã¸ã§ã¯ããåå¾ãã¾ãã (é¢é£å)= : é¢é£ãããªãã¸ã§ã¯ããä»£å ¥ãã¾ãã(èªåçã«DBã¸ä¿åããã¾ã) (é¢é£å).nil? : é¢é£ãããªãã¸ã§ã¯ããåå¨ããªããã¨ã確èªãã¾ãã(ãªããã° true ãè¿ã) build_(é¢é£å)(attributes = {}) : é¢é£ãããªãã¸ã§ã¯ããä½æãã¦è¿ãã¾ãã(DBã¸ã®ä¿åã¯ããã¾ãã) create
{{#tags}}- {{label}}
{{/tags}}