Editing User

<% form_for(@user) do |f| %> <%= f.error_messages %>

<%= f.label :name %>
<%= f.text_field :name %>

<%= f.label :state %>
<%= f.collection_select :state_event, @user.state_transitions, :event, :to_name, :include_blank => @user.state_name.to_s %>

<%= f.label :access_state %>
<%= f.collection_select :access_state_event, @user.access_state_transitions, :event, :event, :include_blank => "don't change" %>

<%= f.submit 'Update' %>

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