Am 2013-12-03 18:42, schrieb Walter Lee Davis:
> View source as generated by Rails in your browser, and see what these
> checkboxes look like in HTML. That's where I would start debugging
> this. My guess is that you need these to be supervisioncategory_ids,
> since that's what the b/t is saying the model is named. But without
> looking at the HTML, we won't know if your checkboxes are properly
> named to post as an array back to your controller.
>
> Walter
Here you go:
<div class="field">
<label for="phonenote_supervision">Supervision</label><br>
<input id="phonenote_supervision_ids_1"
name="phonenote[supervision_ids][]" value="1" type="checkbox">
<label for="phonenote_supervision_ids_1">TG</label>
<input id="phonenote_supervision_ids_2"
name="phonenote[supervision_ids][]" value="2" type="checkbox">
<label for="phonenote_supervision_ids_2">P</label>
<input id="phonenote_supervision_ids_3"
name="phonenote[supervision_ids][]" value="3" type="checkbox">
<label for="phonenote_supervision_ids_3">Fahrdienst</label>
<input name="phonenote[supervision_ids][]" value="" type="hidden">
</div>
Regards
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3235dd6002254342d2d0cab22997fa9e%40briefkasten.daishi.de.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment