Module: SaferInitialize
- Defined in:
- lib/safer_initialize.rb,
lib/safer_initialize/globals.rb,
lib/safer_initialize/railtie.rb,
lib/safer_initialize/version.rb,
lib/safer_initialize/configuration.rb,
lib/safer_initialize/active_record/extensions.rb
Defined Under Namespace
Modules: ActiveRecord
Classes: Configuration, Error, Globals, Railtie
Constant Summary
collapse
- VERSION =
'0.3.0'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
14
15
16
|
# File 'lib/safer_initialize.rb', line 14
def configuration
@configuration ||= Configuration.new
end
|
10
11
12
|
# File 'lib/safer_initialize.rb', line 10
def configure
yield(configuration)
end
|
.with_safe(&block) ⇒ Object
21
22
23
|
# File 'lib/safer_initialize.rb', line 21
def with_safe(&block)
Globals.set(__safe: true, &block)
end
|