Created
August 4, 2010 06:35
Revisions
-
mikeymckay created this gist
Aug 4, 2010 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/usr/bin/env ruby require 'rubygems' require 'sinatra' require 'friendly' Friendly.configure({ :adapter => "sqlite", :database => "database.sqlite3" }) class Blob include Friendly::Document attribute :name, String attribute :value, String indexes :name end before do Friendly.create_tables! Blob.create({ :name => "Mike", :value => "Social Justice Hacker" }) end get '/' do Blob.first(:name => "Mike").inspect end