views:

46

answers:

2

i would like to write a message using an instince variable in the new invition action like this. redirect_to new_invitation_path("invite your friend")

Controller invitations:

def new(message)
 @message = message
 @from_user_id = facebook_session.user.to_s
end

Apparently it is not possible how can i find a way around this?

+2  A: 

You might want to clarify your question, but wouldn't a flash message solve your problem?

Jakub Hampl
Yeah, flash is designed exactly for this scenario
Toby Hede
i am using Facebooker library and flash doesnt work proprely .I have to find another way
fenec
Then just pass it as a get parameter in your uri.
Jakub Hampl
+1  A: 

I guess that redirect_to goes through the client, so you might need to use params[] for that

Thiago
can i have an example?
fenec