RailsCasts Pro episodes are now free!

Learn more or hide this

HakonB's Profile

GitHub User: hab

Comments by HakonB

Avatar

The contents of the from_email method is short-hand for

ruby
def self.from_email(email)
    PasswordReset.new(User.find_by_email(email))
end

Ryan uses implicit parentheses and the fact that you can call other class-level methods without a prefix in a class-level method.