Sha256: 9824af7fd322c55d328b6d08a474d6968a779ba388ef2959f9d189fdedc614de

Contents?: true

Size: 526 Bytes

Versions: 13

Compression:

Stored size: 526 Bytes

Contents

class Contact < ActiveRecord::Base
  # mock out self.columns so no pesky db is needed for these tests
  def self.column(name, sql_type = nil, options = {})
    @columns ||= []
    @columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, options[:default], sql_type.to_s, options[:null])
  end

  column :name,        :string
  column :age,         :integer
  column :avatar,      :binary
  column :created_at,  :datetime
  column :awesome,     :boolean
  column :preferences, :string
  
  serialize :preferences
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
activerecord-2.0.2 test/fixtures/contact.rb
activerecord-2.0.1 test/fixtures/contact.rb
activerecord-2.0.0 test/fixtures/contact.rb
activerecord-2.0.4 test/fixtures/contact.rb
activerecord-2.0.5 test/fixtures/contact.rb
radiant-0.6.5.1 vendor/rails/activerecord/test/fixtures/contact.rb
radiant-0.6.5 vendor/rails/activerecord/test/fixtures/contact.rb
radiant-0.6.6 vendor/rails/activerecord/test/fixtures/contact.rb
radiant-0.6.7 vendor/rails/activerecord/test/fixtures/contact.rb
radiant-0.6.8 vendor/rails/activerecord/test/fixtures/contact.rb
radiant-0.6.9 vendor/rails/activerecord/test/fixtures/contact.rb
spree-0.0.9 vendor/rails/activerecord/test/fixtures/contact.rb
spree-0.2.0 vendor/rails/activerecord/test/fixtures/contact.rb