When I try to add user_3 as a friend using the following code:
= link_to 'Add Friend', friendships_path(:friend_id = user), :method =
:post
#= which generates http://localhost:3000/friendships?friend_id=3
This is what happens in my server console:
Started GET /friendships?friend_id=3 for
This is what I have for rake routes. It looks like friendships_path is
FriendshipsController#index (like you said), but with :method = :post it
should link to FriendshipsController#create?
It looks like GET is happening instead of POST.
GET/friendships(.:format)
{:controller=friendships,
I'm having issues creating Friendships in Rails 3 beta.
I'm following Railscast 163 (
http://asciicasts.com/episodes/163-self-referential-association) and this is
what I have in the relevant files:
*## CONTROLLERS*
# application_controller.rb
class ApplicationController ActionController::Base
3 matches
Mail list logo