module ActsAsShardable::AttributeMethods

Private Instance Methods

_assign_attribute(k, v) click to toggle source

@overload

Calls superclass method
# File lib/acts_as_shardable/attribute_methods.rb, line 6
def _assign_attribute(k, v)
  if persisted? && k.to_s == self.class.base_class.shard_method.to_s
    raise WrongShardingError, "The sharding key #{k} can't be change"
  end

  super
end