Class: Admin::MenusController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::MenusController
- Defined in:
- app/controllers/admin/menus_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/admin/menus_controller.rb', line 28 def create = Effective::Menu.new() @page_title = 'New Menu' if .save flash[:success] = 'Successfully created menu' redirect_to effective_pages.() else flash.now[:danger] = 'Unable to create menu' render :action => :new end end |
#index ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/admin/menus_controller.rb', line 9 def index if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0') @datatable = Effective::Datatables::Menus.new() else @datatable = EffectiveMenusDatatable.new(self) end @page_title = 'Menus' end |
#new ⇒ Object
21 22 23 24 25 26 |
# File 'app/controllers/admin/menus_controller.rb', line 21 def new = Effective::Menu.new() @page_title = 'New Menu' end |
#show ⇒ Object
43 44 45 46 47 48 |
# File 'app/controllers/admin/menus_controller.rb', line 43 def show = Effective::Menu.find(params[:id]) @page_title = .to_s end |