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
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/activerecord-3.2.22.5/examples/simple.rb
activerecord-3.2.22.5 examples/simple.rb
activerecord-3.2.22.4 examples/simple.rb
activerecord-3.2.22.3 examples/simple.rb
activerecord-3.2.22.2 examples/simple.rb
activerecord-3.2.22.1 examples/simple.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/examples/simple.rb
activerecord-3.2.22 examples/simple.rb
activerecord-4.0.13 examples/simple.rb
activerecord-4.0.13.rc1 examples/simple.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.12/examples/simple.rb
activerecord-4.0.11.1 examples/simple.rb
activerecord-4.0.12 examples/simple.rb
activerecord-3.2.21 examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/activerecord-3.2.18/examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.18/examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.18/examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/activerecord-3.2.18/examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.18/examples/simple.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.18/examples/simple.rb