Sha256: 03d500f515387c570f035d8d551493fb75cabe6d3d639621410f5b89a2d6acc3
Contents?: true
Size: 573 Bytes
Versions: 3
Compression:
Stored size: 573 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 module Models 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 # Page end # Models end # Blogaze
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
blogaze-0.1.0 | lib/blogaze/models/page.rb |
blogaze-0.0.3 | lib/blogaze/models/page.rb |
blogaze-0.0.2 | lib/blogaze/models/page.rb |