Class: Kms::Public::EntriesController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Kms::Public::EntriesController
- Defined in:
- app/controllers/kms/public/entries_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/kms/public/entries_controller.rb', line 7 def create entry = @model.entries.new(values: entry_params) unless @model.allow_creation_using_form? && entry.save render json: {errors: entry.errors}.to_json, status: :unprocessable_entity end end |