Skip to content

Instantly share code, notes, and snippets.

@nerdinand
Created March 20, 2015 22:13
Show Gist options
  • Save nerdinand/d6d839841a18a481eed7 to your computer and use it in GitHub Desktop.
Save nerdinand/d6d839841a18a481eed7 to your computer and use it in GitHub Desktop.
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'testing.db'
)
class Testing < ActiveRecord::Base
end
Testing.connection.create_table :testings do |t|
t.string :format
end
record = Testing.new(format: 'foo')
record.save!
record = Testing.first
record.send('format')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment