public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
class Riddle
include DataMapper::Resource
property :id, Serial
 
property :created_at, DateTime
property :updated_at, DateTime
 
property :title, String
 
property :html, Text
property :html_engine, String
property :css, Text
property :css_engine, String
property :js, Text
property :js_engine, String
 
def title=(value)
super(value.empty? ? "Yet another untitled Riddle" : value)
end
end
 
DataMapper.finalize

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.