Method: Integral::Backend::BaseController#create
- Defined in:
- app/controllers/integral/backend/base_controller.rb
#create ⇒ Object
POST / Resource creation
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/controllers/integral/backend/base_controller.rb', line 57 def create I18n.t('integral.navigation.create'), "new_backend_#{controller_name.singularize}_path".to_sym @resource = resource_klass.new(resource_params) yield if block_given? if @resource.save respond_successfully(('creation_success'), send("edit_backend_#{controller_name.singularize}_path", @resource.id)) else respond_failure(('creation_failure'), :new) end end |