Method: Infold::AppViewFormsController#update
- Defined in:
- app/controllers/infold/app_view_forms_controller.rb
#update ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/infold/app_view_forms_controller.rb', line 34 def update @view = AppViewForm.find(params[:id]) @app = @view.app @view.assign_attributes(post_params) if @view.save redirect_to @view, flash: { info: t('infold.flash.updated') } else Rails.logger.debug "エラー #{@view.errors.full_messages}" flash.now[:warning] = t('infold.flash.invalid') render status: :unprocessable_entity end end |