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!
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
seem to be getting a routing error when i delete a friendship.
Routing Error No route matches [DELETE] "/user_friendships/16/accept" Try running rake routes for more information on available routes.
Jason SeiferTreehouse Guest Teacher
It looks like you're deleting to the accept_user_friendship_path rather than just the user_friendship_path. Could that be it?
Thanks Jason, you are right!
<%= form_for @user_friendship, url: accept_user_friendship_path(@user_friendship), method: :delete do |form| %> <%= submit_tag "Delete Friendship", class: 'btn btn-danger' %>
<%= form_for @user_friendship, url: u ser_friendship_path(@user_friendship), method: :delete do |form| %> <%= submit_tag "Delete Friendship", class: 'btn btn-danger' %>