Closed jinscoe-zz closed 12 years ago
I've just gotten started integrating amistad - loving the features and have it all working in the CLI.
I'm attempting to create buttons on user show pages to add a friend however I'm not sure what the form_for would look like.
Currently I have something like
<%= form_for current_user.friend_with @user do |f| %> <div><%= f.hidden_field :@user.id %></div> <div><%= f.submit "Invite Friend", :class=> "btn primary" %></div> <% end %>
This clearly doesn't work, but it's the idea of what I'm trying to do - I want an "Invite Friend" button on a user page that triggers the create method in my FriendshipsController.
Thanks for any help!
I've just gotten started integrating amistad - loving the features and have it all working in the CLI.
I'm attempting to create buttons on user show pages to add a friend however I'm not sure what the form_for would look like.
Currently I have something like
This clearly doesn't work, but it's the idea of what I'm trying to do - I want an "Invite Friend" button on a user page that triggers the create method in my FriendshipsController.
Thanks for any help!