I'm new to rails and this is my first post to this list so apologies
if I'm little slow on a few things.
I have a standard database app with multiple users and a limited
access admin controller. Occasionally, I need to run some very
processor-intensive queries on the database that slow the app to a
crawl. During this time, I would like to lock out users from accessing
the app. Specifically, I want to redirect users accessing any
controller other than the admin controller to a page that says "check
Currently, I just edit my .htaccess file when I do this. However, I
want to be be able to run an action from my admin controller that does
this for me.
I tried setting a global variable (with a dollar sign) in my admin
controller but none of the other controllers seem to be able to see
it. I can't store the variable in the database either, since the busy
database is the reason I wanted to lock users out in the first place.
I'm also considering just having the action run a shell script but I'm
not really sure how to do this.
If anyone has any ideas, I'd be much obliged.