I would like to give my users an opportunity to switch the application
into a sandboxmode, where it is possible to play with it without the
danger to insert junk into the database.
I guess, setting RAILS_ENV = ‘development’ works globally for the whole
server. Is there a possibility to switch a single session to
development?
err , just add another connection to your database.yml file and create a
clone db , i dont remember who to switch environment without restarting
the
webserver.
anyway what you may be able to do is change the db connection.
How to do this?
Does it work for a single session, while other sessions work in
production mode? Is it possible to switch the current session to sandbox
mode and back?
what i am afraid that will be a problem are plug ins and gems, you could
add
a filter in the action controller and stuff, but i think that the
plguins
and gem may not follow
I would like to give my users an opportunity to switch the application
into a sandboxmode, where it is possible to play with it without the
danger to insert junk into the database.
I guess, setting RAILS_ENV = ‘development’ works globally for the whole
server. Is there a possibility to switch a single session to
development?
I don’t think you want to do that. I think you want to create a clone
of your production environment (call it sandbox or something) with a
separate database, then have a completely separate instance of the
application running with RAILS_ENV set to ‘sandbox’.
I don’t think you want to do that. I think you want to create a clone
of your production environment (call it sandbox or something) with a
separate database, then have a completely separate instance of the
application running with RAILS_ENV set to ‘sandbox’.
Thats probably the safe version of the feature without experiments with
unknown results…
In which source file is RAILS_ENV defined to the current einvironment?