Ruby on rails 更改Rails 2中的重置密码url

Ruby on rails 更改Rails 2中的重置密码url,ruby-on-rails,ruby,ruby-on-rails-2,reset-password,Ruby On Rails,Ruby,Ruby On Rails 2,Reset Password,轨道:2.3.7 Ruby:1.8.7 我想更改重置密码URL。我在development.RB中设置了默认URL,但它显示localhost def create @user = User.find_by_email(params[:email]) if @user @user.deliver_perishable_email!(:password_reset_instructions) flash[:notice] = "Check your em

轨道:2.3.7 Ruby:1.8.7 我想更改重置密码URL。我在development.RB中设置了默认URL,但它显示localhost

  def create
    @user = User.find_by_email(params[:email])
    if @user
      @user.deliver_perishable_email!(:password_reset_instructions)
      flash[:notice] = "Check your email for password reset instructions."
      redirect_to root_url
    else
      flash[:notice] = "No user was found with that email address."
      render :action => :new
    end
  end
Development.rb

config.action_mailer.default_url_options = { :host => "http://*****.com" }
O/p


在中添加以下代码

应用程序控制器

def url_电子邮件_重置_密码

 ActionMailer::Base.default_url_options[:host] pointing to localhost:3000
结束

 ActionMailer::Base.default_url_options[:host] pointing to localhost:3000