Class: ListController

Inherits:
ApplicationController
  • Object
show all
Includes:
DryCrud::GenericModel, DryCrud::Nestable, DryCrud::Rememberable, DryCrud::RenderCallbacks, DryCrud::Searchable, DryCrud::Sortable
Defined in:
app/controllers/list_controller.rb

Overview

Abstract controller providing a basic list action. The loaded model entries are available in the view as an instance variable named after the model_class or by the helper method entries.

The index action lists all entries of a certain model and provides functionality to search and sort this list. Furthermore, it remembers the last search and sort parameters after the user returns from a displayed or edited entry.

Direct Known Subclasses

CrudController

Instance Method Summary collapse

Methods included from DryCrud::GenericModel

#ivar_name, #model_ivar_get, #model_ivar_set, #model_scope, #path_args

Methods included from DryCrud::Nestable

prepended

Instance Method Details

#indexObject

GET /entries

GET /entries.json

List all entries of this model.



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

def index
  entries
end