Created
June 12, 2012 23:31
-
-
Save eileencodes/2920806 to your computer and use it in GitHub Desktop.
Admin Users Views for Active Admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register AdminUser do | |
index do | |
column :id | |
column :email | |
column :full_name do |field| | |
"#{field.first_name} #{field.last_name}" | |
end | |
column :last_sign_in_at | |
default_actions | |
end | |
show do | |
attributes_table do | |
row :id | |
row :full_name do |field| | |
"#{field.first_name} #{field.last_name}" | |
end | |
row :email | |
row :last_sign_in_at | |
row :sign_in_count | |
end | |
end | |
form do |f| | |
f.inputs "Edit User" do | |
f.input :first_name | |
f.input :last_name | |
f.input :email | |
f.input :password | |
f.input :password_confirmation | |
end | |
f.buttons | |
end | |
filter :id | |
filter :email | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment