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

Destroy friendship method not working

When i click on the edit friendship link after i created the destroy method, i get a SyntaxError at /user_friendships/12/edit syntax error, unexpected keyword_do_block, expecting keyword_end

And its says its coming from here actionpack (3.2.13) lib/action_view/template.rb, line 297

Totally lost what it means! Any guidance would be appreciated.

-Drew

2 Answers

expecting keyword_end means that a block is not closed with an "end"

So either an if statement doesn't have an end. Or most likely, in your user_friendship.rb model class your edit method is missing an end. Go check it:

def edit

    there is probably stuff in here that needs another end

end

thanks!