Sha256: 0634ae9bf7a0e5e365f00bb45ffed8c4a316ce743ddaa4959841ea30ebda9e6c
Contents?: true
Size: 1.21 KB
Versions: 10
Compression:
Stored size: 1.21 KB
Contents
class Spree::Admin::UserPasswordsController < Devise::PasswordsController helper 'spree/base' include Spree::Core::ControllerHelpers::Auth include Spree::Core::ControllerHelpers::Common include Spree::Core::ControllerHelpers::Store helper 'spree/admin/navigation' helper 'spree/admin/tables' layout 'spree/layouts/admin' # Overridden due to bug in Devise. # respond_with resource, :location => new_session_path(resource_name) # is generating bad url /session/new.user # # overridden to: # respond_with resource, :location => spree.login_path # def create self.resource = resource_class.send_reset_password_instructions(params[resource_name]) if resource.errors.empty? set_flash_message(:notice, :send_instructions) if is_navigational_format? respond_with resource, :location => spree.admin_login_path else respond_with_navigational(resource) { render :new } end end # Devise::PasswordsController allows for blank passwords. # Silly Devise::PasswordsController! # Fixes spree/spree#2190. def update if params[:spree_user][:password].blank? set_flash_message(:error, :cannot_be_blank) render :edit else super end end end
Version data entries
10 entries across 10 versions & 2 rubygems