t-minus icon indicating copy to clipboard operation
t-minus copied to clipboard

Ability to only show prelaunch on certain controllers / actions

Open feralbob opened this issue 14 years ago • 2 comments

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.

feralbob avatar Sep 26 '10 14:09 feralbob

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.

johngrimes avatar Sep 27 '10 03:09 johngrimes

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

jordanmichaelrushing avatar May 16 '13 02:05 jordanmichaelrushing