Module: AttributeExt

Defined in:
lib/attribute_ext.rb,
lib/attribute_ext/railtie.rb,
lib/attribute_ext/safe_attributes.rb,
lib/attribute_ext/hidden_attributes.rb

Defined Under Namespace

Modules: HiddenAttributes, SafeAttributes Classes: Railtie

Class Method Summary collapse

Class Method Details

.activemodel_3_0?Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/attribute_ext.rb', line 12

def self.activemodel_3_0?
  ::ActiveModel::VERSION::MAJOR == 3 and
  ::ActiveModel::VERSION::MINOR == 0
end

.setupObject

:nodoc:



7
8
9
10
# File 'lib/attribute_ext.rb', line 7

def self.setup # :nodoc:
  ActiveRecord::Base.send :include, AttributeExt::HiddenAttributes
  ActiveRecord::Base.send :include, AttributeExt::SafeAttributes
end