Class: Dscf::Credit::FacilitatorsController
- Inherits:
-
ApplicationController
- Object
- Dscf::Core::ApplicationController
- ApplicationController
- Dscf::Credit::FacilitatorsController
- Includes:
- Dscf::Core::Common, Dscf::Core::ReviewableController
- Defined in:
- app/controllers/dscf/credit/facilitators_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/dscf/credit/facilitators_controller.rb', line 6 def create super do facilitator = @clazz.new(model_params) facilitator.reviews.build(status: "draft", context: "default") facilitator end end |
#update ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/dscf/credit/facilitators_controller.rb', line 14 def update unless @obj.editable? return render_error( errors: [ "Cannot update facilitator after submission. Use modification request workflow instead." ], status: :unprocessable_entity ) end super end |