Class: Boss::Admin::BannersController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Boss::Admin::BannersController
- Defined in:
- app/controllers/boss/admin/banners_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/boss/admin/banners_controller.rb', line 9 def create @banner = Boss::Banner.new(params[:banner]) if @banner.save flash[:notice] = t('banners.flash.saved') redirect_to main_app.admin_root_path else flash[:alert] = t('banners.flash.failed_to_save') render :new end end |