Module: SaferRailsConsole::Patches::Boot::SandboxFlag
- Defined in:
- lib/safer_rails_console/patches/boot/sandbox_flag.rb
Defined Under Namespace
Modules: Rails
Class Method Summary collapse
Class Method Details
.console_options(opt, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/safer_rails_console/patches/boot/sandbox_flag.rb', line 7 def self.(opt, = {}) opt. = 'Usage: rails console [environment] [options]' opt.on('-s', '--[no-]sandbox', 'Explicitly enable/disable sandbox mode.') { |v| [:sandbox] = v } opt.on('-w', '--writable', 'Alias for --no-sandbox.') { |v| [:writable] = v } opt.on('-r', '--read-only', 'Alias for --sandbox.') { |v| [:'read-only'] = v } opt.on('-e', '--environment=name', String, 'Specifies the environment to run this console under (test/development/production).', 'Default: development') { |v| [:environment] = v.strip } end |