Sindri Guðmundsson wrote:
> Hi,
> I'm having some trouble with my form. The thing is I'm using a loop to
> generate check_box_tags and then when the user clicks submit I want to
> be able to see what he checked. For each checked box I want to copy a
> file to the corresponding directory.
>
> Here's the form:
>
> <%form_for :cats, :url => {:action => :save_mt} do%>
> <%[email protected] do |flokkur|%>
> <p>
> <%= check_box_tag("cats[#{flokkur}]",1,false) %>
> <%= flokkur %>
> </p>
> <%end%>
> <%= submit_tag "Vista mælitæki", :class => 'submit'%>
> <%end%>
>
[...]
This is strange code. You're inside a form_for, so why are you using
check_box_tag rather than check_box ?
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
Posted via http://www.ruby-forum.com/.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.