Sha256: fb2afc8657d8be48efefad706164eace2b6ff60a5757ce587c7deb61ff44b162
Contents?: true
Size: 848 Bytes
Versions: 11
Compression:
Stored size: 848 Bytes
Contents
module Locomotive class PasswordsController < ::Devise::PasswordsController include Locomotive::Concerns::SslController include Locomotive::Concerns::RedirectToMainHostController include Locomotive::Concerns::WithinSiteController within_site_only_if_existing true layout '/locomotive/layouts/account' helper Locomotive::BaseHelper before_filter :set_locale def update super do |resource| if params[:locomotive_account].try(:[], 'password').blank? resource.errors.add_on_blank(:password) end end end private def after_sending_reset_password_instructions_path_for(resource_name) new_locomotive_account_session_path end def set_locale if current_site? I18n.locale = current_site.accounts.first.locale end end end end
Version data entries
11 entries across 11 versions & 1 rubygems