Displaying 1 result from an estimated 1 matches for "locationsuser".
Did you mean:
locationsusers
2008 Jan 09
0
problem with checkboxes updating table
...cation.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])
@locations = Location.find(:all)
@locationsusers = LocationsUser.new
end
def update
@user = User.find(params[:id])
@locations = Location.find(:all)
@locations.each do |location|
@locationsids = location.id
end
@locationsusers = LocationsUser.new(params[:locations_users])
@locationsusers.user_id = @user.id
@locationsusers.locat...