Sha256: cfd77a6d9186b26136c2e5c0e98bca94616242bb7a5ffbb5c43378c487f675a1
Contents?: true
Size: 452 Bytes
Versions: 6
Compression:
Stored size: 452 Bytes
Contents
require 'sequel' DB = Sequel.sqlite class User < Sequel::Model(:user) set_schema do primary_key :id text :nick text :password text :email time :created end end class Page < Sequel::Model(:page) include Ramaze::Helper::Link set_schema do primary_key :id text :text end def url R(PageController, :view, id) end end [ User, Page ].each do |model| model.create_table! unless model.table_exists? end
Version data entries
6 entries across 6 versions & 3 rubygems