Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I open a rails console in read-only mode?

I'm used to interrogating my rails db via script/console.

But in some instances I need to be exceptionally careful about not changing data, so I'd like to be able to open the console in a read-only mode.

Is there any way to do this?

Thanks!

like image 235
brahn Avatar asked Sep 02 '11 19:09

brahn


1 Answers

See this question

Can I specify in database.yml that a rails environment should have readonly access to the DB?

script/console --sandbox
like image 97
spike Avatar answered Sep 25 '22 15:09

spike