Class: Dscf::Credit::CreditProductsController
- Inherits:
-
ApplicationController
- Object
- Dscf::Core::ApplicationController
- ApplicationController
- Dscf::Credit::CreditProductsController
- Includes:
- Dscf::Core::AuditableController, Dscf::Core::Common, Dscf::Core::ReviewableController
- Defined in:
- app/controllers/dscf/credit/credit_products_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/dscf/credit/credit_products_controller.rb', line 14 def create super do credit_product = @clazz.new(model_params) credit_product.reviews.build(status: "draft", context: "default") credit_product end end |
#update ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/dscf/credit/credit_products_controller.rb', line 22 def update unless @obj.editable? return render_error( errors: [ "Cannot update credit product after submission. Use modification request workflow instead." ], status: :unprocessable_entity ) end super end |