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

c# - IMAP GMAIL getting folder list problem -

CUDA shared memory -