Class: BlueberryCMS::Admin::MenusController
- Inherits:
-
Object
- Object
- BlueberryCMS::Admin::MenusController
- Defined in:
- app/controllers/blueberry_cms/admin/menus_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 15 def create @menu = Menu.new() if @menu.save redirect_to(params[:continue] ? [:edit, :admin, @menu] : [:admin, :menus]) else render :new end end |
#destroy ⇒ Object
34 35 36 37 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 34 def destroy @menu.destroy redirect_to [:admin, :menus] end |
#edit ⇒ Object
24 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 24 def edit; end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 7 def index @menus = Menu.ordered end |
#new ⇒ Object
11 12 13 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 11 def new @menu = Menu.new end |
#update ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/blueberry_cms/admin/menus_controller.rb', line 26 def update if @menu.update() redirect_to(params[:continue] ? [:edit, :admin, @menu] : [:admin, :menus]) else render :edit end end |