#! /usr/bin/env ruby -Ku
#
# 2008-06-06 katoy
#
# See
#  http://jp.rubyist.net/magazine/?cmd=view&p=0006-RubyOnRails&key=activerecord
#  http://dev.ariel-networks.com/articles/workshop/rails-activerecord

require 'user'

ActiveRecord::Base.default_timezone = :utc
# logger = ActiveRecord::Base.logger = Logger.new(STDOUT)

ActiveRecord::Base.configurations = YAML.load_file('database.yml')
ActiveRecord::Base.establish_connection('development')

user = User.new do |u|
  u.name = "David"
  u.occupation = "Code Artist"
end
user.save!

user = User.new(
  :name => "Name-02",
  :occupation => "002")
user.save!

user = User.new(
  {:name => "Name-03", :occupation => "003"})
user.save

user = User.create!(
  {:name => "Name-04", :occupation => "004"})


