Skip to content

Instantly share code, notes, and snippets.

@eileencodes
Created June 12, 2012 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eileencodes/2920806 to your computer and use it in GitHub Desktop.
Save eileencodes/2920806 to your computer and use it in GitHub Desktop.
Admin Users Views for Active Admin
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