Class: Admin::CompactRestaurantsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationController
- BaseController
- Admin::CompactRestaurantsController
- Defined in:
- app/controllers/admin/compact_restaurants_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
#generate_compact_restaurant ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/controllers/admin/compact_restaurants_controller.rb', line 20 def generate_compact_restaurant restaurant_id = params.require(:id) GenerateCompactRestaurantsWorker.perform_async(restaurant_id.to_i) redirect_to admin_compact_restaurants_path, notice: "Compact restaurant is being generate for restaurant ID: #{restaurant_id}" end |
#index ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/admin/compact_restaurants_controller.rb', line 8 def index title: 'Compact Restaurant List' @grid = ::Admin::CompactRestaurantsGrid.new(params[:admin_compact_restaurants_grid]) do |scope| scope.page(params[:page]).per(50) end end |
#show ⇒ Object
16 17 18 |
# File 'app/controllers/admin/compact_restaurants_controller.rb', line 16 def show title: "Compact Restaurant Details: #{@compact_restaurant.name}" end |