Class: AhoyCaptain::SourcesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- AhoyCaptain::SourcesController
- Includes:
- Limitable
- Defined in:
- app/controllers/ahoy_captain/sources_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Methods included from Rangeable
Methods included from CompareMode
#compare_mode?, #comparison_mode, included
Instance Method Details
#index ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/controllers/ahoy_captain/sources_controller.rb', line 11 def index results = cached(:sources) do SourceQuery.call(params) .limit(limit) end @sources = paginate(results).map { |source| AhoyCaptain::SourceDecorator.new(source, self) } end |