Skip to content

Instantly share code, notes, and snippets.

@axgle
Created November 4, 2009 05:18
Show Gist options
  • Save axgle/225797 to your computer and use it in GitHub Desktop.
Save axgle/225797 to your computer and use it in GitHub Desktop.
#geany: http://q.sohu.com/forum/5/topic/2893314
require 'activerecord'
ActiveRecord::Base.establish_connection :adapter=>"sqlite3",
:database=>"a.db"
ActiveRecord::Schema.define do
create_table "posts",:force=>true do |t|
t.string :title
end
end
class Post < ActiveRecord::Base
end
Post.create :title=>rand
p Post.all
__END__
sudo aptitude install geany
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment