Class: Rails::Configuration

Inherits:
Object show all
Defined in:
lib/has_many_polymorphs/configuration.rb

Overview

Access the has_many_polymorphs_options hash in your Rails::Initializer.run#after_initialize block if you need to modify the behavior of Rails::Initializer::HasManyPolymorphsAutoload.

Instance Method Summary collapse

Instance Method Details

#has_many_polymorphs_optionsObject



8
9
10
# File 'lib/has_many_polymorphs/configuration.rb', line 8

def has_many_polymorphs_options
  ::HasManyPolymorphs.options
end

#has_many_polymorphs_options=(hash) ⇒ Object



12
13
14
# File 'lib/has_many_polymorphs/configuration.rb', line 12

def has_many_polymorphs_options=(hash)
  ::HasManyPolymorphs.options = HashWithIndifferentAccess.new(hash)
end