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
Accepting friendships
I get the following error when accepting friendship in the browser - "Undefined method requested". All my model and controller methods seems to mirror Jason's ..im stumped.
NoMethodError in User_friendships#edit
Showing /Users/seun/Sites/gistapp/app/views/user_friendships/edit.html.erb where line #6 raised:
undefined method `requested?' for nil:NilClass
Extracted source (around line #6):
3: </div>
4:
5:
6: <% if @user_friendship.requested? %>
7: <h3> Do you really want to be friends with <%= @friend.first_name %>?</h3>
8: <% end %>
9:
Application Trace | Framework Trace | Full Trace app/views/user_friendships/edit.html.erb:6:in app_views_user_friendships_edit_html_erb_2669135530722971415_70326224234 280'
2 Answers
Error resolved, just a typo in my controller.
ecp
838 PointsBAM! Glad it's working for you :D