Class: Admin::ResourcesController

Inherits:
AdminController show all
Defined in:
app/controllers/admin/resources_controller.rb,
lib/generators/unknown_admin/install/templates/resources_controller.rb

Direct Known Subclasses

UsersController

Instance Method Summary collapse

Instance Method Details

#createObject



23
24
25
# File 'app/controllers/admin/resources_controller.rb', line 23

def create
  create! { collection_path }
end

#list_fieldsObject



8
9
10
# File 'app/controllers/admin/resources_controller.rb', line 8

def list_fields
  resource_class.column_names
end

#search_fieldsObject



18
19
20
# File 'app/controllers/admin/resources_controller.rb', line 18

def search_fields
  []
end

#show_fieldsObject



13
14
15
# File 'app/controllers/admin/resources_controller.rb', line 13

def show_fields
  (resource_class.column_names-["id","created_by","updated_by","created_at","updated_at"])
end

#updateObject



26
27
28
# File 'app/controllers/admin/resources_controller.rb', line 26

def update
  update! { collection_path }
end