Module: SimpleCrudify::CrudActions::Create Private
- Defined in:
- lib/simple_crudify/crud_actions.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create ⇒ Object private
Instance Method Details
#create ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 40 41 42 43 44 |
# File 'lib/simple_crudify/crud_actions.rb', line 36 def create @resource = model_klass.new(resource_params) if @resource.save redirect_to after_create_path, notice: controller_notice(action_name) else render template: template_path(:new) end end |