Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Includes:
SmartCache
Defined in:
lib/simple_cache/active_record.rb

Constant Summary collapse

EXPIRE_TIME =
10.minutes

Constants included from SmartCache

SmartCache::VERSION

Instance Method Summary collapse

Methods included from SmartCache

block_cache, included, #update_caching

Instance Method Details

#update_attributes(attributes) ⇒ Object



7
8
9
10
11
12
# File 'lib/simple_cache/active_record.rb', line 7

def update_attributes(attributes)
  if self.frozen?
    @attributes = @attributes.dup
  end
  super
end

#update_attributes!(attributes) ⇒ Object



14
15
16
17
18
19
# File 'lib/simple_cache/active_record.rb', line 14

def update_attributes!(attributes)
  if self.frozen?
    @attributes = @attributes.dup
  end
  super
end