Sha256: 89f63fde1c5da787972b61f854d7939e24604582f76b3a78fc8d7a54289d8396

Contents?: true

Size: 915 Bytes

Versions: 9

Compression:

Stored size: 915 Bytes

Contents

class Spree::UserPasswordsController < Devise::PasswordsController
  include Spree::Core::ControllerHelpers
  helper 'spree/users', 'spree/base'

  ssl_required

  after_filter :associate_user

  def new
    super
  end

  # Temporary Override until next Devise release (i.e after v1.3.4)
  # line:
  #   respond_with resource, :location => new_session_path(resource_name)
  # is generating bad url /session/new.user
  #
  # overridden to:
  #   respond_with resource, :location => 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.login_path
    else
      respond_with_navigational(resource) { render :new }
    end
  end

  def edit
    super
  end

  def update
    super
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_auth-1.1.5 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.4 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.3 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.2 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.2.rc1 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.1 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.0 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.0.rc2 app/controllers/spree/user_passwords_controller.rb
spree_auth-1.1.0.rc1 app/controllers/spree/user_passwords_controller.rb