Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

"Cancel account" bug

Hi, after deploying Treebook, I found that if I sign up for an account, post a status and then hit cancel account, I get the following error (the bug works the same way on localhost):

http://screencast.com/t/6vR65Sx9

I actually commented out the Gravatar code thinking that was the problem, but now get a similar error, but line 14 of the file instead - undefined method for 'full_name'

Any idea how to solve this? thanks!

2 Answers

I am assuming you have both garvatar_url and full_name defined in your user model similar to this?

def full_name first_name + " " + last_name end

def gravatar_url stripped_email = email.strip downcased_email = stripped_email.downcase hash = Digest::MD5.hexdigest(downcased_email)

"http://gravatar.com/avatar/#{hash}"

end

Yep, I did this all exactly as shown in the videos.