aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikac.hu>2019-03-23 16:47:26 +0900
committerPrem Sichanugrist <s@sikac.hu>2019-03-23 19:31:03 +0900
commitb27105252bce6a69f6d57c05d4ea28d20e84f8ae (patch)
tree13072d72ae90d7c83597b6c832799454aba13b75 /railties/test/commands
parentefb706daad0e2e1039c6abb4879c837ef8bf4d10 (diff)
downloadrails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.tar.gz
rails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.tar.bz2
rails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.zip
Add config.disable_sandbox option to Rails console
A long-running `rails console --sandbox` could cause a database server to become out-of-memory as it's holding on to changes that happen on the database. Given that it's common for Ruby on Rails application with huge traffic to have separate write database and read database, we should allow the developers to disable this sandbox option to prevent someone from accidentally causing the Denial-of-Service on their server.
Diffstat (limited to 'railties/test/commands')
-rw-r--r--railties/test/commands/console_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/commands/console_test.rb b/railties/test/commands/console_test.rb
index 1941c83d6d..f6df2b694a 100644
--- a/railties/test/commands/console_test.rb
+++ b/railties/test/commands/console_test.rb
@@ -129,7 +129,7 @@ class Rails::ConsoleTest < ActiveSupport::TestCase
def build_app(console)
mocked_console = Class.new do
attr_accessor :sandbox
- attr_reader :console
+ attr_reader :console, :disable_sandbox
def initialize(console)
@console = console