Sha256: fb739c3da16066abec0924a6af3089d47e3f73d25c5e7dedea664859d59f83d3
Contents?: true
Size: 693 Bytes
Versions: 4
Compression:
Stored size: 693 Bytes
Contents
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => File.join(File.dirname(__FILE__), 'test.db') class CreateSchema < ActiveRecord::Migration def self.up create_table :whiskies, :force => true do |t| t.string :name, :origin, :description t.integer :abv end create_table :animals, :force => true do |t| t.string :name, :noise end end end CreateSchema.suppress_messages { CreateSchema.migrate(:up) } class Animal < ActiveRecord::Base def bark "#{noise.capitalize}! #{noise.capitalize}!" end end class Whisky < ActiveRecord::Base cleanse_attr :name, :description def drink "You quaffed #{description}" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
thumblemonks-inquisition-0.1.1 | test/models.rb |
thumblemonks-inquisition-0.1.2 | test/models.rb |
thumblemonks-inquisition-0.1.3 | test/models.rb |
thumblemonks-inquisition-0.1.4 | test/models.rb |