Dear all,
Model.column_names gives all the fields in the table.
But it doesnot show the associated fields value.
my model is associated with has_and_belongs_to_many :groups
how can i get the associated fields also...
Any helps ..
Thank you
Dear all,
Model.column_names gives all the fields in the table.
But it doesnot show the associated fields value.
my model is associated with has_and_belongs_to_many :groups
how can i get the associated fields also...
Any helps ..
Thank you
You can get all the associations via reflections:
Model.reflect_on_all_associations
HTH