Sha256: 0656c4f1eda23317edb157fcf478173ae09b4e5e22ec456ee0758051c8baaf41
Contents?: true
Size: 847 Bytes
Versions: 13
Compression:
Stored size: 847 Bytes
Contents
module Locomotive class SessionsController < ::Devise::SessionsController include Locomotive::Concerns::SslController include Locomotive::Concerns::RedirectToMainHostController include Locomotive::Concerns::WithinSiteController within_site_only_if_existing true # Note: do not validate the membership layout '/locomotive/layouts/account' before_action :set_locale helper Locomotive::BaseHelper private def after_sign_in_path_for(resource) current_site? ? dashboard_path(current_site) : sites_path end def after_sign_out_path_for(resource) new_locomotive_account_session_path end def set_locale I18n.locale = current_site? ? current_site.accounts.first.locale : default_locale end def default_locale Locomotive.config.default_locale end end end
Version data entries
13 entries across 13 versions & 1 rubygems