Class: Stay::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
CurrencyHelper, LocaleHelper
Defined in:
app/controllers/stay/application_controller.rb

Instance Method Summary collapse

Methods included from LocaleHelper

#all_locales_options, #available_locales, #available_locales_options, #config_locale?, #current_locale, #find_with_fallback_default_locale, #locale_full_name, #locale_param, #locale_presentation, #params_locale?, #should_render_locale_dropdown?, #supported_locale?, #supported_locales, #supported_locales_for_all_stores, #supported_locales_options, #user_locale?

Methods included from CurrencyHelper

#currency_options, #currency_presentation, #currency_symbol, #should_render_currency_dropdown?, #supported_currency_options

Instance Method Details

#after_sign_in_path_for(resource) ⇒ Object



15
16
17
18
19
20
21
# File 'app/controllers/stay/application_controller.rb', line 15

def (resource)
  if resource.has_stay_role?("admin")
    admin_users_path
  else
    root_path
  end
end

#current_storeObject



23
24
25
# File 'app/controllers/stay/application_controller.rb', line 23

def current_store
  @current_store ||= Stay::Store.default
end