Editing User

<%= form_for @user, :action => resource(@user) do %> <%= error_messages %>

<%= text_field :name, :label => 'Name' %>

<%= label :state %>
<%= select :state_event, :selected => @user.state_event.to_s, :collection => @user.state_transitions, :value_method => :event, :text_method => :human_to_name, :prompt => @user.human_state_name %>

<%= label :access_state %>
<%= select :access_state_event, :selected => @user.access_state_event.to_s, :collection => @user.access_state_transitions, :value_method => :event, :text_method => :human_event, :prompt => "don't change" %>

<%= submit 'Update' %>

<% end =%> <%= link_to 'Show', resource(@user) %> | <%= link_to 'Back', resource(:users) %>