$:.unshift( "../lib" ) require 'rubygems' require 'capcode' require 'capcode/base/ar' class Basic < Capcode::Model 1.0 def self.up create_table :stories do |t| t.string :title t.string :body t.string :date end end end class UpdateBasic < Capcode::Model 1.1 def self.up create_table :users do |t| t.string :name t.string :password end end def self.down drop_table :users end end class Story < Capcode::Base include Capcode::Resource end module Capcode class HTTPError def r404(f) "Pas glop !!! #{f} est inconnu !!!" end end class Index < Route '/' def get r = "
" story = Story.all story.each do |s| r += "#{s.body}
" end r+"