activate-admin
:datetime
:check_box
:file
:slug
:image :text_area
:password
:select :lookup :collection :text
def self.fields_for_index
[:name, :email, :role, :time_zone]
end
def self.fields_for_form
{
:name => :text,
:email => :text,
:picture => :image,
:role => :select,
:time_zone => :select,
:password => :password,
:password_confirmation => :password,
:connections => :collection
}
end
def self.new_hints
{
:password => 'Leave blank to keep existing password'
}
end
def self.edit_hints
{
:password => 'Leave blank to keep existing password'
}
end
def filter_options
{
:q => 'query',
:f => [:field1 => 'query1', :field2 => 'query2'],
:o => 'order',
:d => 'desc'
}
end