Module: AttrDefault

Defined in:
lib/attr_default.rb,
lib/attr_default/railtie.rb,
lib/attr_default/version.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Railtie

Constant Summary collapse

VERSION =
'1.0.0'

Class Method Summary collapse

Class Method Details

.initialize_active_record_extensionsObject



11
12
13
# File 'lib/attr_default/railtie.rb', line 11

def self.initialize_active_record_extensions
  ActiveRecord::Base.extend(AttrDefault::ClassMethods)
end

.initialize_railtieObject

Rails 3 initialization



5
6
7
8
9
# File 'lib/attr_default/railtie.rb', line 5

def self.initialize_railtie
  ActiveSupport.on_load :active_record do
    AttrDefault.initialize_active_record_extensions
  end
end