Class: Services::AvailableFilesController
- Inherits:
-
ConfiguredAccountBaseController
- Object
- ActionController::Base
- ApplicationController
- ServiceDefinitionBaseController
- ConfiguredAccountBaseController
- Services::AvailableFilesController
- Includes:
- StatusMasking
- Defined in:
- app/controllers/services/available_files_controller.rb
Constant Summary
Constants included from StatusMasking
StatusMasking::NEGATE_MASK, StatusMasking::STATUS_MASK
Constants inherited from ApplicationController
Services::ApplicationController::MAX_LIST_LENGTH
Instance Attribute Summary
Attributes inherited from ConfiguredAccountBaseController
Attributes inherited from ServiceDefinitionBaseController
Instance Method Summary collapse
Methods included from StatusMasking
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/services/available_files_controller.rb', line 8 def index status, operator = determine_status_operator(params[:status]) if status.present? @available_files = configured_account.available_files.where("status #{operator} ?", status).order("created_at DESC").limit(MAX_LIST_LENGTH) else @available_files = configured_account.available_files.order("created_at DESC").limit(MAX_LIST_LENGTH) end end |