Displaying 1 result from an estimated 1 matches for "locationsid".
Did you mean:
location_id
2008 Jan 09
0
problem with checkboxes updating table
...on.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.location_id = @locationsids.id
if @locationsusers.update_attributes(params[:locations_users])
flash[:notice] = ''User was successfully updated....