Module: AckRocketCmsCatalog::Controllers::ItemCategories
- Extended by:
- ActiveSupport::Concern
- Included in:
- ItemCategoriesController
- Defined in:
- lib/ack_rocket_cms_catalog/controllers/item_categories.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 |
# File 'lib/ack_rocket_cms_catalog/controllers/item_categories.rb', line 6 def index @item_categories = item_category_class.enabled.sorted.to_a @root_catalog = item_category_class.enabled.roots.sorted.all.to_a # index_crumbs end |
#page_title ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/ack_rocket_cms_catalog/controllers/item_categories.rb', line 27 def page_title if @item_category @item_category.page_title else super end end |
#show ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ack_rocket_cms_catalog/controllers/item_categories.rb', line 12 def show @item_category = item_category_class.enabled.find(params[:id]) if !@item_category.text_slug.blank? and @item_category.text_slug != params[:id] redirect_to @item_category, status_code: 301 return end @seo_parent_page = find_seo_page(item_categories_path) @children = @item_category.children.enabled.sorted.all.to_a @items = @item_category.items.enabled.sorted.all.to_a # index_crumbs # category_crumbs end |