0

Hartl tutorial Chapter 10.2.3

When I attempt to submit existing user email to generate the password reset token, it breaks on the 2nd update_attribute call in the User model:

/Users/apple/Desktop/Screen Shot 2015-12-05 at 5.05.49 PM.png

The reset_sent_at column is present in the database, and I can write to it no problem from the console:

usr = User.find_by(name: 'locutius’)

usr.update_attribute(:reset_sent_at, Time.zone.now)

usr.reset_sent_at

Sat, 05 Dec 2015 22:27:27 UTC +00:00

but something about the context via the server is causing it to fall over. Any debug clues greatly appreciated.

Tobias
  • 4,523
  • 2
  • 20
  • 40
jjt
  • 125
  • 1
  • 10

1 Answers1

1

You don't try to call update_attribute but udpate_attribute.

You just have a simple misspelling in there.

Tobias
  • 4,523
  • 2
  • 20
  • 40
  • d’oh! must’ve looked at that 20 times... thanks for the catch -- maybe it’s time for a proper rails IDE instead of vim – jjt Dec 06 '15 at 00:37