Sha256: 252ff10e9276c0f04daa414bd84a22998d3bb9b7dfc8ab28c72c5ce6ff47aa9a

Contents?: true

Size: 339 Bytes

Versions: 24

Compression:

Stored size: 339 Bytes

Contents

# -*- encoding : utf-8 -*-
ActiveRecord::Base.connection.create_table(:books, :force => true) do |t|
  t.string  :title
  t.string  :body
  t.integer :user_id
  t.integer :images_count, :default => 0
end

class Book < ActiveRecord::Base
  acts_as_cached

  belongs_to :user, :counter_cache => true
  has_many :images, :as => :imagable
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
second_level_cache-2.1.16 test/model/book.rb
second_level_cache-2.1.15 test/model/book.rb
second_level_cache-2.1.14 test/model/book.rb
second_level_cache-2.1.13 test/model/book.rb
second_level_cache-2.1.10 test/model/book.rb
second_level_cache-2.1.9 test/model/book.rb
second_level_cache-2.1.8 test/model/book.rb
second_level_cache-2.1.7 test/model/book.rb
second_level_cache-2.1.6 test/model/book.rb
second_level_cache-2.1.5 test/model/book.rb
second_level_cache-2.1.2 test/model/book.rb
second_level_cache-2.1.1 test/model/book.rb
second_level_cache-2.1.0 test/model/book.rb
second_level_cache-2.1.0.rc2 test/active_record/model/book.rb
second_level_cache-2.1.0.rc1 test/active_record/model/book.rb
second_level_cache-2.0.0 test/active_record/model/book.rb
second_level_cache-2.0.0.rc1 test/active_record/model/book.rb
second_level_cache-2.0.0.beta test/active_record/model/book.rb
second_level_cache-1.6.2 test/active_record/model/book.rb
second_level_cache-1.6.1 test/active_record/model/book.rb