Editing user

<% form_for(@user) do |f| %> <%= f.error_messages %> <%= render :partial => "form", :locals => { :f => f } -%>

<%= f.submit "Update" %>

<% end %>

Locations

This user has access to the following locations:

<% form_for([@user,@location]) do |f| %> <%= collection_select 'locations', 'location_id', Location.find(:all), :id, :name, {:prompt => true} %> <%= submit_tag 'Add Location' %> <% end %>

<%= link_to 'Show', @user %> | <%= link_to 'Back', users_path %>