Class: Tramway::EntitiesController
- Inherits:
-
Object
- Object
- Tramway::EntitiesController
- Defined in:
- app/controllers/tramway/entities_controller.rb
Overview
Main controller for entities pages
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/tramway/entities_controller.rb', line 13 def index @entities = if entity.page(:index).scope.present? model_class.public_send(entity.page(:index).scope) else model_class.order(id: :desc) end.page(params[:page]) @namespace = entity.route&.namespace end |