On Feb 12, 1:12 pm, Newb Newb
<li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> 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
> --
> Posted viahttp://www.ruby-forum.com/.
You can get all the associations via reflections:
Model.reflect_on_all_associations
HTH
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.