Class: Services::AssessmentRequestsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Services::AssessmentRequestsController
- Includes:
- StatusMasking
- Defined in:
- app/controllers/services/assessment_requests_controller.rb
Constant Summary
Constants included from StatusMasking
StatusMasking::NEGATE_MASK, StatusMasking::STATUS_MASK
Constants inherited from ApplicationController
Services::ApplicationController::MAX_LIST_LENGTH
Instance Method Summary collapse
Methods included from StatusMasking
Instance Method Details
#create ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/services/assessment_requests_controller.rb', line 18 def create ca = ConfiguredAccount.find params[:configured_account_id] RequestSltcBaselineContext.call(ca, safe_params) render :index end |
#index ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/services/assessment_requests_controller.rb', line 8 def index where_clause = build_where_clause if where_clause.present? @assessment_requests = AssessmentRequest.where(where_clause).order("created_at DESC").limit(MAX_LIST_LENGTH) else @assessment_requests = AssessmentRequest.order("created_at DESC").limit(MAX_LIST_LENGTH) end end |