Sha256: 32cc31220203914c904809585ac8026fb906061baf7e7b20818e53c62fd37bcc
Contents?: true
Size: 691 Bytes
Versions: 2
Compression:
Stored size: 691 Bytes
Contents
class Contact < ActiveRecord::Base establish_connection(:adapter => 'fake') connection.tables = ['contacts'] connection.primary_keys = { 'contacts' => 'id' } # mock out self.columns so no pesky db is needed for these tests def self.column(name, sql_type = nil, options = {}) connection.merge_column('contacts', name, sql_type, options) end column :name, :string column :age, :integer column :avatar, :binary column :created_at, :datetime column :awesome, :boolean column :preferences, :string column :alternative_id, :integer serialize :preferences belongs_to :alternative, :class_name => 'Contact' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activerecord-nuodb-adapter-2.0.3 | test/models/contact.rb |
activerecord-nuodb-adapter-2.0 | test/models/contact.rb |