Class: Portfolio::Admin::SiteMenuLinksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Portfolio::Admin::SiteMenuLinksController
- Defined in:
- app/controllers/portfolio/admin/site_menu_links_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 22 def create @site_menu_link = SiteMenuLink.new() if @site_menu_link.save redirect_to [:admin, @site, :site_menu_links], notice: 'Item menu link was successfully created.' else render :new end end |
#destroy ⇒ Object
40 41 42 43 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 40 def destroy @site_menu_link.destroy redirect_to [:admin, @site, :site_menu_links], notice: 'Item menu link was successfully destroyed.' end |
#edit ⇒ Object
19 20 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 19 def edit end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 8 def index @site_menu_links = @site..all end |
#new ⇒ Object
15 16 17 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 15 def new @site_menu_link = SiteMenuLink.new site: @site end |
#show ⇒ Object
12 13 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 12 def show end |
#update ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/controllers/portfolio/admin/site_menu_links_controller.rb', line 32 def update if @site_menu_link.update() redirect_to [:admin, @site, :site_menu_links], notice: 'Item menu link was successfully updated.' else render :edit end end |