Sha256: 0a121e33cd5f814a68c73c3072fcd8ca5d3dc8758886817000beb2d414fadf8f

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

module Catarse
class PasswordsController < Devise::PasswordsController
  def create
    self.resource = resource_class.where(:provider => 'devise').send_reset_password_instructions(params[resource_name])

    if successfully_sent?(resource)
      respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name))
    else
      flash[:failure] = resource.errors.full_messages.to_sentence
      redirect_to root_url(:show_forgot_password => true)
    end
  end

  protected

  # The path used after sending reset password instructions
  def after_sending_reset_password_instructions_path_for(resource_name)
    root_path
  end
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
catarse_core-1.0.0.beta app/controllers/catarse/passwords_controller.rb