Class: Portfolio::Admin::SiteItemCategoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Portfolio::Admin::SiteItemCategoriesController
- Defined in:
- app/controllers/portfolio/admin/site_item_categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 19 def create @categ = SiteItemCategory.new(admin_site_item_category_params) if @categ.save redirect_to admin_site_item_categories_path, notice: 'Site item category was successfully created.' else render :new end end |
#destroy ⇒ Object
39 40 41 42 43 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 39 def destroy @categ.destroy redirect_to admin_site_item_categories_path, notice: 'Site item category was successfully destroyed.' end |
#edit ⇒ Object
16 17 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 16 def edit end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 8 def index @categories = SiteItemCategory.all end |
#new ⇒ Object
12 13 14 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 12 def new @categ = SiteItemCategory.new end |
#update ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'app/controllers/portfolio/admin/site_item_categories_controller.rb', line 30 def update if @categ.update(admin_site_item_category_params) redirect_to admin_site_item_categories_path, notice: 'Site item category was successfully updated.' else render :edit end end |