Class: Spree::Admin::BannerBoxesController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/admin/banner_boxes_controller.rb

Instance Method Summary collapse

Instance Method Details

#cloneObject



18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/spree/admin/banner_boxes_controller.rb', line 18

def clone
  @new = @banner_box.duplicate

  if @new.save
    flash.notice = I18n.t('notice_messages.banner_box_cloned')
  else
    flash.notice = I18n.t('notice_messages.banner_box_not_cloned')
  end

  respond_with(@new) { |format| format.html { redirect_to edit_admin_banner_box_url(@new) } }
end

#indexObject



5
6
7
# File 'app/controllers/spree/admin/banner_boxes_controller.rb', line 5

def index
  respond_with(@collection)
end

#showObject



9
10
11
# File 'app/controllers/spree/admin/banner_boxes_controller.rb', line 9

def show
  redirect_to( :action => :edit )
end

#updateObject



13
14
15
16
# File 'app/controllers/spree/admin/banner_boxes_controller.rb', line 13

def update
  @banner_box.enhance_settings
  super
end