form_remote_tag comes back before saving really done?

Hi,

I am having troubles with a form_remote_tag.
I have this form:

<% form_remote_tag :url => { :action => 'create', :controller =>
'invitations' } do %>
   <%= hidden_field_tag 'invite', user.id %>
   <%= hidden_field_tag 'command', 'invite_user' %>
   <%= submit_tag('Invite') %>
<% end %>

That ends up if the a controllers function (after entering from
create...):

def invite_user(friend_to_invite)
    invited_user = User.find(friend_to_invite)
    current_user.request_friendship_with(invited_user)
    invitation = Invitation.new
    invitation.user_id = current_user.id
    invitation.status = 0

    if invitation.save

       @pending_friends_by_me = current_user.pending_friends_by_me
       puts "@pending_friends_by_me"
       puts @pending_friends_by_me
       puts "/@pending_friends_by_me"

       render :update do |page|
       page[:sent_invitations].replace_html :partial =>
"sent_invitations"
       end

      return
    end
end

try a
  current_user.reload
or
  current_user.pending_friends_by_me.reload
in your controller after the save.

maybe this helps.