Joon
5/7/2010 - 4:33 PM

active record test

active record test

%w(rubygems active_record sqlite3).each {|lib| require lib}

ActiveRecord::Base.establish_connection({:adapter => 'sqlite3',
                                        :database => 'rtest.sqlite3'
})

class TestMigration < ActiveRecord::Migration
  def self.up
  create_table :joons do |t|
    t.string :name
    t.string :status
  end
  end
end

TestMigration.migrate(:up)

class Joon < ActiveRecord::Base
end

Joon.new({:name => 'Ellen', :status => 'daughter'}).save
Joon.new({:name => 'Joon', :status => 'rubyhead'}).save