Class: Admin::LoyaltyLevelsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationController
- BaseController
- Admin::LoyaltyLevelsController
- Defined in:
- app/controllers/admin/loyalty_levels_controller.rb
Constant Summary
Constants inherited from BaseController
BaseController::INTERNAL_SERVER_ERROR_MESSAGE
Instance Method Summary collapse
Methods inherited from BaseController
#destroy_session, #identity_cache_memoization, #sign_in_page, #user_developer_session
Methods included from LogrageCustomLogger
Methods included from AdminHelper
#dynamic_pricings_formatter, #link_to_admin_reservations_path_by_id, #link_to_admin_restaurants_path_by_id, #link_to_log, #optional_locales, #optional_locales_with_labels, #staff_signed_in?
Methods included from UpdateLocaleConcern
Methods inherited from ApplicationController
#after_sign_in_path_for, #after_sign_out_path_for, #default_url_options, #identity_cache_memoization, #render_not_found, #routing_error, search_params_key=
Methods included from ControllerHelpers
#check_boolean_param, #get_banners, #inventory_params, #reservation_params
Instance Method Details
#edit ⇒ Object
17 |
# File 'app/controllers/admin/loyalty_levels_controller.rb', line 17 def edit; end |
#index ⇒ Object
8 9 10 11 12 13 |
# File 'app/controllers/admin/loyalty_levels_controller.rb', line 8 def index @grid = Admin::LoyaltyLevelsGrid.new(params[:admin_loyalty_levels_grid]) do |scope| scope.page(params[:page]) end return unless stale_etag? @grid.assets end |
#show ⇒ Object
15 |
# File 'app/controllers/admin/loyalty_levels_controller.rb', line 15 def show; end |
#update ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/controllers/admin/loyalty_levels_controller.rb', line 19 def update if @loyalty_level.update(permitted_params) redirect_to([:admin, @loyalty_level], notice: 'Loyalty Level updated successfully') else redirect_back fallback_location: back_fallback_location, alert: @loyalty_level.errors..to_sentence end end |