Sha256: 4b7247c57921999c114eccc38dbeac18285c7669d18b63de75394205dcac4320
Contents?: true
Size: 497 Bytes
Versions: 1
Compression:
Stored size: 497 Bytes
Contents
# # Blogaze # Copyright (C) 2011-2013 Jack Polgar # # Blogaze is released under the BSD 3-clause license. # @license http://opensource.org/licenses/BSD-3-Clause # module Blogaze class Page < Sequel::Model plugin :validation_helpers def validate validates_presence [:title, :slug, :body] end def before_create super self.created_at = Time.now.to_i self.updated_at = 0 end def before_save self.updated_at = Time.now.to_i end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blogaze-0.0.1 | lib/blogaze/model/page.rb |