ruby on rails - ActiveRecord: Is there a method to get the type of association between two classes? -


something like:

post.association(comment) => :has_many 

yes. use *reflect_on_association*

post.reflect_on_association(:comments).macro 

Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -