Module: RESTFramework::Mixins::CreateModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/mixins/model_controller_mixin.rb
Overview
Mixin for creating records.
Instance Method Summary collapse
- #create ⇒ Object
-
#create! ⇒ Object
Perform the ‘create!` call and return the created record.
Instance Method Details
#create ⇒ Object
703 704 705 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 703 def create return api_response(self.create!, status: :created) end |
#create! ⇒ Object
Perform the ‘create!` call and return the created record.
708 709 710 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 708 def create! return self.get_create_from.create!(self.get_create_params) end |