Sha256: a939b5c452f0f74e24d95e876f3b000e65c1e5ffe9b23021607bc152c9151a23

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

# -*- encoding : utf-8 -*-
ActiveRecord::Base.connection.create_table(:users, :force => true) do |t|
  t.text    :options
  t.string  :name
  t.string  :email
  t.integer :books_count, :default => 0
  t.integer :images_count, :default => 0
  t.timestamps
end

class User < ActiveRecord::Base
  CacheVersion = 3
  serialize :options, Array
  acts_as_cached(:version => CacheVersion, :expires_in => 3.day)

  has_many :books
  has_many :images, :as => :imagable
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
second_level_cache-2.0.0.beta test/active_record/model/user.rb
second_level_cache-1.6.2 test/active_record/model/user.rb