【发布时间】:2014-11-10 15:04:19
【问题描述】:
当我调用找回密码函数时我得到:
错误信息::: PasswordsController#create stack 中的 SystemStackError 级别太深了
html:
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => 'well form-inline' }) do |f| %>
<span style="font-size:14px;margin-right:10px">email:</span>
<%= f.email_field :email %>
<%= f.submit "submit", :class => "btn btn-success", :style => "margin-left:10px" %>
passwords_controller:
def create
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
if successfully_sent?(resource)
#respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name))
respond_to do |format|
format.html { redirect_to after_sending_reset_password_instructions_path_for(resource_name) }
format.json { render :json => {:info=>"aaa" }.to_json }
end
else
respond_to do |format|
format.html { redirect_to new_password_path(resource_name),:notice => "bbb" }
format.json { render :json => {:errors=>"ccc" }.to_json }
end
end
【问题讨论】:
-
这通常意味着你正在递归地做某事并且它没有终止。
-
我发现了问题,在我的 devise.rb 中,我使用了
require 'devise_resque_mailer'和config.mailer = 'DeviseResqueMailer',然后我删除了它,它可以工作。
标签: ruby-on-rails devise