Is it possible to set a flash[:notice] message that would be set in a controller on http://www.example.com but would be read and rendered on client.example.com?
In this particular instance, http://www.example.com and client.example.com are in the same Rails 3.2 application.
A user is coming in via http://www.example.com/signup, completing a form and then being redirect to a newly created subdomain client.example.com.
Can you do something like:
flash[:notice] = "hello world", domain: "*.example.com"
Flash does not support this out of the box. If you want to do something like this you’ll need to set a cookie on the domain and then retrieve it from the subdomain.
You need to set the domain of the cookie so that is accessible in the subdomain. Here is an example you can put in your environment file or an initializer better yet!: