In Rails Can we pass a parameters to a new Action
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?
You might want to clarify your question, but wouldn't a flash
message solve your problem?
I guess that redirect_to goes through the client, so you might need to use params[] for that
精彩评论