Passing submit input parameter in a AJAX post request
===

I'm refactoring a form into an AJAX post request. 

Here's the existing form:

		<%= form_for([@group, @invitation], :remote => true, :html => { :'data-type' => 'html', :class => 'fbinvite_form', :id => friend[:identifier]}) do |f| %>
			<%= f.hidden_field :recipient_email, :value => "facebook@meetcody.com" %>

			<div class = "fbinvite btn_list_right" id = "<%= friend[:identifier] %>">
			<%= f.submit "Invite", :class => "btn btn-medium btn-primary", :name => "fb" %>
			</div>
		<% end %>

In the controller I have logic that checks for the name of the submit input:

    if params[:fb]
    ... 
    elsif params[:somethingelse]
    ...
    end

That's the background. I am now trying to replace the above form with the following ajax (added dummy data to make it clearer):

	$.post('/groups/7/invitations', { "recipient_email": "facebook@meetcody.com", "commit" : "fb", "fb" : "fb" }, function(response) {
		alert("invite created!");
	});
    }

This successfully hits the controller, but doesn't evaluate as true on the condition "if params[:fb]". As you can see I tried some really basic ways of passing that parameter in, but it obviously didn't work.

How can I change my ajax request so that params[:fb] evaluates as true?