After I create an object in Rails, I redirect_to the new object page. On that first view to the object owner, I want a a pop-up asking the user if they want to invite their facebook friends to this new object.
How do you check in the view if this piece of HTML should be showed that one time?
The only way that I know of sending data to a new object is with redirect_to :notice, but that just shows up as text in a banner at the top.
Flash hash is probably the easiest way to accomplish this. It’s only available
to the next request after being set. Add
in create action of your controller and
in your view.