Sha256: 7f2fecd1f7d8a3553e09601e3a5033ff58a36b9a81c9f244822051875a3e50f1

Contents?: true

Size: 336 Bytes

Versions: 187

Compression:

Stored size: 336 Bytes

Contents

# frozen_string_literal: true

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

187 entries across 182 versions & 15 rubygems

Version Path
activerecord-8.0.0 examples/simple.rb
activerecord-7.2.2 examples/simple.rb
activerecord-7.1.5 examples/simple.rb
activerecord-8.0.0.rc2 examples/simple.rb
activerecord-7.2.1.2 examples/simple.rb
activerecord-7.1.4.2 examples/simple.rb
activerecord-7.0.8.6 examples/simple.rb
activerecord-6.1.7.10 examples/simple.rb
activerecord-8.0.0.rc1 examples/simple.rb
activerecord-6.1.7.9 examples/simple.rb
activerecord-7.2.1.1 examples/simple.rb
activerecord-7.1.4.1 examples/simple.rb
activerecord-7.0.8.5 examples/simple.rb
activerecord-8.0.0.beta1 examples/simple.rb
omg-activerecord-8.0.0.alpha9 examples/simple.rb
omg-activerecord-8.0.0.alpha8 examples/simple.rb
omg-activerecord-8.0.0.alpha7 examples/simple.rb
omg-activerecord-8.0.0.alpha4 examples/simple.rb
omg-activerecord-8.0.0.alpha3 examples/simple.rb
omg-activerecord-8.0.0.alpha2 examples/simple.rb