t-minus
t-minus copied to clipboard
Ability to only show prelaunch on certain controllers / actions
Instead of clearing all the routes would it be possible to only use prelaunch on certain controllers/actions.
For example I want to show most of my content, but show a prelaunch page on account creation.
That could be a handy feature.
Any ideas how we could implement this? I'm guessing we would need some way of selectively clearing some routes and not others.
You could just do an 'unless' statement in the application.html.erb file. If you have a confirmation page as well then just add an 'or' statement: unless (params[:controller] == 'prelaunch' && ( params[:action] == 'new' || params[:action] == 'show')) redirect_to new_prelaunch_path