search for: locations_ids

Displaying 1 result from an estimated 1 matches for "locations_ids".

Did you mean: location_ids
2008 Jan 09
0
problem with checkboxes updating table
...is fine, but there is no such location with id 11. There are only 5 locations and their ids go from 1-5! I can''t seem to find where the 11 is coming from. This is in the view: <% Location.find(:all).each do |location| %> <input type="checkbox" name="user[locations_ids][]" value="<%= location.id %>" <% if @user.locations.include?(location) %> checked="checked" <% end %> /> <%= location.name %> <% end %> This is in the controller: [code=]def edit @user = User.find(params[:id]...