【发布时间】:2014-12-22 22:02:55
【问题描述】:
我在调用send_reset_password_instructions({:email => 'my@email.com'}) 设计助手时收到Net::SMTPSyntaxError 501 Syntax Error。我正在使用 Ruby 1.9.3、Rails 3.2.19 并设计 2.2.8。
调用函数的一个sn-p:
class UserController
def reset
User.send_reset_password_instructions(hash_params) # {:email => 'my@email.com'}
# ... more code down here ...
end
end
User 类激活了以下设计模块:
class User
...
devise :registerable, :database_authenticatable, :recoverable,
:rememberable, :trackable, :validatable, :omniauthable
## Devise Fields
## Database authenticatable
field :email, :type => String, :null => false
field :encrypted_password, :type => String, :null => false
## Recoverable
field :reset_password_token, :type => String
field :reset_password_sent_at, :type => Time
## Rememberable
field :remember_created_at, :type => Time
## Trackable
field :sign_in_count, :type => Integer
field :current_sign_in_at, :type => Time
field :last_sign_in_at, :type => Time
field :current_sign_in_ip, :type => String
field :last_sign_in_ip, :type => String
...
end
我错过了什么吗?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 devise