Sha256: 7f2fecd1f7d8a3553e09601e3a5033ff58a36b9a81c9f244822051875a3e50f1

Contents?: true

Size: 336 Bytes

Versions: 194

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

194 entries across 189 versions & 17 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8.7/examples/simple.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/examples/simple.rb
activerecord-8.0.1 examples/simple.rb
activerecord-8.0.0.1 examples/simple.rb
activerecord-7.2.2.1 examples/simple.rb
activerecord-7.1.5.1 examples/simple.rb
activerecord-7.0.8.7 examples/simple.rb
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