Class: Decidim::Design::Components::CardsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::Design::Components::CardsController
- Includes:
- ControllerHelpers, FilterResource, Paginable
- Defined in:
- decidim-design/app/controllers/decidim/design/components/cards_controller.rb
Constant Summary
Constants included from Paginable
Instance Method Summary collapse
Methods included from ControllerHelpers
#expose, included, #present, #presenter
Methods inherited from ApplicationController
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#index ⇒ Object
15 16 17 18 19 20 21 |
# File 'decidim-design/app/controllers/decidim/design/components/cards_controller.rb', line 15 def index Search.call("", current_organization, filters, page_params) do on(:ok) do |results| expose(sections: results.transform_values { |v| v[:results].first(4) }) end end end |