Class: Admin::AuthorsController

Inherits:
Releaf::ActionController
  • Object
show all
Defined in:
lib/generators/dummy/templates/controllers/admin/authors_controller.rb

Instance Method Summary collapse

Instance Method Details

#resources_per_pageObject


6
7
8
# File 'lib/generators/dummy/templates/controllers/admin/authors_controller.rb', line 6

def resources_per_page
  params.has_key?(:show_all) ? nil : 20
end

#searchable_fieldsObject


2
3
4
# File 'lib/generators/dummy/templates/controllers/admin/authors_controller.rb', line 2

def searchable_fields
  [:name, :surname, books: [:title, chapters: [:title]]]
end