Pieter Mans wrote:>
> Hi
>
> How would I add a CSS class to a check_box_tag helper like this:
>
> check_box_tag("addable_photo[]", @photo.id)
>
> Thanks!
>
check_box_tag("addable_photo[]", @photo.id, flase, {:class =>
"someclass"})
The false indicates you don''t want the checkbox checked by default.
See:
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M000500
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---