Dejan Dimic | 23 Jul 17:13
Picon

Re: cannot figure out how to handle multi checkbox


As I find somewhere on the net:

View (as many times as needed):

        <input id="item_selected_keywords" name="selected_keywords[]"
        type="checkbox" value="exterior" />

Controller:

        selected_keywords = params[:selected_keywords]
        @item.keywords = selected_keywords.join(" ")

On Jul 23, 3:43 pm, Naija Guy <rails-mailing-l...@...>
wrote:
> I had seen that, but it's not clear to me (and some of the people who
> commented on there agree with me).  As I said, my checkboxes are not
> tied to a model.
>
> Dejan Dimic wrote:
> > take a look athttp://railscasts.com/episodes/17
>
> > On Jul 23, 8:13�am, Naija Guy <rails-mailing-l...@...>
>
> --
> Posted viahttp://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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane