Module: Switchman::ActiveRecord::Persistence

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

Instance Method Summary collapse

Instance Method Details

#touchObject

touch reads the id attribute directly, so it’s not relative to the current shard



5
6
7
# File 'lib/switchman/active_record/persistence.rb', line 5

def touch(*)
  shard.activate(self.class.shard_category) { super }
end

#update_columnsObject



10
11
12
# File 'lib/switchman/active_record/persistence.rb', line 10

def update_columns(*)
  shard.activate(self.class.shard_category) { super }
end