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


Blocking UI


Does anyone knows where the accepted_user_franships method was defined, because I called mine accept, and I don't remembered where I defined it.


4 Answers

Jason Seifer
Jason Seifer
Treehouse Guest Teacher

Hey Alex Alex try checking your user_friendships_controller and user_friendship model.

I fixed this, the problem was in user model.

Thanks for the post! I actually had the same problem, just forgot to update my user modal as well!

forgot to add this to user.rb model:

has_many :accepted_user_friendships, class_name: 'UserFriendship', foreign_key: :user_id, conditions: { state: 'accepted' } has_many :accepted_friends, through: :accepted_user_friendships, source: :friend