Permalink
Browse files

Make use of dm-timestamps's sugar

  • Loading branch information...
1 parent 1f03078 commit 0dcf8aa43e676d700677ca700d12dc31078f3aab @sr sr committed May 15, 2009
Showing with 6 additions and 6 deletions.
  1. +2 −2 lib/integrity/build.rb
  2. +2 −2 lib/integrity/commit.rb
  3. +2 −2 lib/integrity/project.rb
View
@@ -6,11 +6,11 @@ class Build
property :output, Text, :default => "", :lazy => false
property :successful, Boolean, :default => false
property :commit_id, Integer, :nullable => false
- property :created_at, DateTime
- property :updated_at, DateTime
property :started_at, DateTime
property :completed_at, DateTime
+ timestamps :at
+
belongs_to :commit, :class_name => "Integrity::Commit",
:child_key => [:commit_id]
View
@@ -7,8 +7,8 @@ class Commit
property :message, String, :length => 255
property :author, Author, :length => 255
property :committed_at, DateTime
- property :created_at, DateTime
- property :updated_at, DateTime
+
+ timestamps :at
has 1, :build, :class_name => "Integrity::Build",
:order => [:created_at.desc]
View
@@ -14,8 +14,8 @@ class Project
property :command, String, :nullable => false, :length => 255, :default => "rake"
property :public, Boolean, :default => true
property :building, Boolean, :default => false
- property :created_at, DateTime
- property :updated_at, DateTime
+
+ timestamps :at
default_scope(:default).update(:order => [:name.asc])

0 comments on commit 0dcf8aa

Please sign in to comment.