belongs_to ã has_many ã§å®£è¨ããã ã¢ãã«éã®ã¢ã½ã·ã¨ã¼ã·ã§ã³ã®æ å ±ãåå¾ããã«ã¯ã ActionRecord::Reflection ã® reflect_on_all_associations ã¡ã½ããã使ãã°ããã ActiveRecord::Base 㯠ActiveRecord::Reflection ã include ãã¦ããã®ã§ã ã¢ãã«ã®ã¯ã©ã¹ã¡ã½ããã¨ãã¦ãã使ããã # å ¨é¨ Task.reflect_on_all_associations # belongs_to ã ã Task.reflect_on_all_associations(:belongs_to) # has_many ã ã Task.reflect_on_all_associations(:has_many) 1 件ã ãåå¾ãã reflect_on_association ãªãã¦
{{#tags}}- {{label}}
{{/tags}}