Scott MacDonald
Smart Alec
Seattle WA 98116

Bio:

Coming up on 25 years in the technology industry after a short stint as a graphic designer and typographer. I parlayed my hobby of writing accounting software for the graphic arts industry into a real job and worked my way up from a networking geek (complete with Apple systems engineer status) into software development and a cush job as the R&D guy for all things web-related back in the stone age (1994-1996). I traded that for a job with a consulting firm and lived that life for many years until landing another real job as a Program Manager. Now I'm a hobbyist again, but supplement my toy budget doing web sites on the side.


2 RailsSpace friends
Aure_thumbnail Aurelius Prochazka
Michael_thumbnail Michael Hartl

Blog:

1 blog post

Another "undefined method" error

I'm having trouble with being able to update an email address or change a password. I keep getting the following error: ===================== NoMethodError in UserController#edit undefined method `try_to_update' for # RAILS_ROOT: ./script/../config/.. #{RAILS_ROOT}/app/controllers/user_controller.rb:60:in `edit' Request Parameters: {"user"=>{"email"=>"foo@bar.com"}, "commit"=>"Update", "attribute"=>"email"} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} ===================== I've been staring at this for quite some time and haven't been able to figure it out. What am I missing? Thanks!
Posted 5 months ago
Modified 5 months ago

Muttonbone_thumbnail Scott MacDonald commented 5 months ago:

I figured it out. There was a missing def for try_to_update in the user controller. I had to go through the whole section of the book to root it out though. Sigh.