Sha256: ff8f4d3fc6da277b68c36892d2d7e66f08ca64baa1fcadecb1fd1154083db998

Contents?: true

Size: 371 Bytes

Versions: 267

Compression:

Stored size: 371 Bytes

Contents

$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_record'

class Person < ActiveRecord::Base
  establish_connection :adapter => 'sqlite3', :database => 'foobar.db'
  connection.create_table table_name, :force => true do |t|
    t.string :name
  end
end

bob = Person.create!(:name => 'bob')
puts Person.all.inspect
bob.destroy
puts Person.all.inspect

Version data entries

267 entries across 236 versions & 16 rubygems

Version Path
activerecord-3.2.16 examples/simple.rb
activerecord-4.0.1 examples/simple.rb
activerecord-4.0.1.rc4 examples/simple.rb
activerecord-4.0.1.rc3 examples/simple.rb
activerecord-4.0.1.rc2 examples/simple.rb
activerecord-4.0.1.rc1 examples/simple.rb
activerecord-3.2.15 examples/simple.rb
activerecord-3.2.15.rc3 examples/simple.rb
activerecord-3.2.15.rc2 examples/simple.rb
activerecord-3.2.15.rc1 examples/simple.rb
activerecord-3.2.14 examples/simple.rb
activerecord-3.2.14.rc2 examples/simple.rb
challah-1.0.0 vendor/bundle/gems/activerecord-4.0.0/examples/simple.rb
activerecord-3.2.14.rc1 examples/simple.rb
activerecord-4.0.0 examples/simple.rb
swipe-rails-0.0.5 vendor/bundle/gems/activerecord-3.2.13/examples/simple.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/examples/simple.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/examples/simple.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/examples/simple.rb
activerecord-4.0.0.rc2 examples/simple.rb