On Sep 2, 8:40 am, John Dax
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> hi,
> i need to pass the value of a checkbox (simple boolean value 0/1) to a
> rails action. how do i do that. the value has nothing todo with any
> model used. i just want to pass the priority the mail should be sent,
> without storing this value in the model. here my code
>
> <b>Urgent: <%= check_box "priority", 1, 0) %>
> ...
> <b>Body:</b><br>
> ...
>
> <%= link_to ''Send'', :controller =>
"newsletters", :action =>
> "sendmails", :id => @newsletter, :priority => priority
%>
> ...
>
> is there some way which includes javascript? i have no form tag wrapped
> around the code, because its in the show.erb.
You''re really better off sticking a form in there - it''s by
far the
easiest way to do this, it is after all what forms were designed to
do.
Fred
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@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
-~----------~----~----~----~------~----~------~--~---