Class: Dashboard::V2::MainController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Dashboard::V2::MainController
- Includes:
- LogrageCustomLogger, OwnerDashboardsHelper, OwnerLoginMode, Pagy::Backend, Pundit::Authorization, Stimulus::TagController
- Defined in:
- app/controllers/dashboard/v2/main_controller.rb
Overview
Base Controller for Dashboard::V2 controllers
Direct Known Subclasses
Group::MainController, InventoriesController, OwnerReviewsController, PackageMenusController, PagesController, ReportsController, ReservationsController, ReviewsController, StaffsController, VoucherMarketplacesController
Defined Under Namespace
Classes: ReservationNotAuthorizedError
Instance Method Summary collapse
- #default_fallback_location ⇒ Object
- #default_url_options ⇒ Object
-
#kiosque_callback ⇒ Object
for testing purpose.
Methods included from LogrageCustomLogger
Methods included from Stimulus::TagController
Methods included from OwnerLoginMode
#current_owner, #group_owner_type?, #request_path_contain_group?, #single_owner_type?
Methods included from OwnerDashboardsHelper
#events_ajax_previous_link, #show_source
Methods inherited from ApplicationController
#after_sign_in_path_for, #after_sign_out_path_for, #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
#default_fallback_location ⇒ Object
62 63 64 |
# File 'app/controllers/dashboard/v2/main_controller.rb', line 62 def default_fallback_location dashboard_v2_reservations_path(locale: I18n.locale) end |
#default_url_options ⇒ Object
58 59 60 |
# File 'app/controllers/dashboard/v2/main_controller.rb', line 58 def { locale: I18n.locale } end |
#kiosque_callback ⇒ Object
for testing purpose
45 46 47 48 49 50 51 52 53 54 55 |
# File 'app/controllers/dashboard/v2/main_controller.rb', line 45 def kiosque_callback application = Doorkeeper::Application.find_by(name: 'Kiosque') if application uri = application.redirect_uri.split.last (client_id: application.uid, redirect_uri: uri, response_type: 'code', scope: application.scopes) else redirect_back fallback_location: dashboard_v2_reservations_path(locale: I18n.locale), alert: 'We are sorry, something went wrong' end end |