当我调用找回密码函数时,我得到:
error info::: SystemStackError in PasswordsController#create stack level too deep
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
最佳答案
我也遇到了同样的问题,我的解决方案如下:
=begin
require 'devise_resque_mailer'
config.mailer = 'DeviseResqueMailer'
=end
关于ruby-on-rails - 设计3.2.4 ,"stack level too deep",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24924479/