raw1z/amistad — Issue #19: Create Friendship Through User Model View
Author: jinscoe
Created: 2012-01-11 18:07:59+00:00
State: open

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

```ruby
<%= form_for current_user.friend_with @user do |f| %>

<%= f.hidden_field :@user.id %>

<%= f.submit "Invite Friend", :class=> "btn primary" %>

<% 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!