rubyonrailsin

A Ruby and Rails talk

Thursday, March 25, 2010


Re: [Rails] Re: collection_select has_many

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

u can do that:

<%= select_tag :skillset_id, option_groups_from_collection_for_select(Skillset.find_all_by_parent_id(nil), :children, :title, :id, :title) %>


Skillset is a act_as_tree model!


hope that helps





On Thu, Mar 25, 2010 at 1:30 PM, Silverbizness <silverbizness@gmail.com> wrote:
Same here.
It's such a pain to find the appropriate documentation to do that.

--
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@googlegroups.com.
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.


--
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@googlegroups.com.
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.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive