Class: Workarea::Api::Storefront::MenusController
- Inherits:
-
ApplicationController
- Object
- Workarea::ApplicationController
- ApplicationController
- Workarea::Api::Storefront::MenusController
- Defined in:
- app/controllers/workarea/api/storefront/menus_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Methods included from UserActivity
#assert_current_user_activity_id, #current_user_activity_id, #user_activity
Methods included from Authentication
#authentication?, #current_user
Instance Method Details
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/workarea/api/storefront/menus_controller.rb', line 7 def index models = Navigation::Menu.all.select(&:active?) @menus = Workarea::Storefront::MenuViewModel.wrap(models, params) end |
#show ⇒ Object
12 13 14 15 |
# File 'app/controllers/workarea/api/storefront/menus_controller.rb', line 12 def show model = Navigation::Menu.active.find(params[:id]) @menu = Workarea::Storefront::MenuViewModel.wrap(model, params) end |