Module: Switchman::ActiveRecord::AttributeMethods

Defined in:
lib/switchman/active_record/attribute_methods.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



122
123
124
125
# File 'lib/switchman/active_record/attribute_methods.rb', line 122

def self.included(klass)
  klass.extend(ClassMethods)
  klass.attribute_method_prefix "global_", "local_", "original_"
end

Instance Method Details

#idObject

ensure that we’re using the sharded attribute method and not the silly one in AR::AttributeMethods::PrimaryKey



129
130
131
132
# File 'lib/switchman/active_record/attribute_methods.rb', line 129

def id
  self.class.define_attribute_methods
  super
end