Permalink
Browse files

Commented out the habtm relationship that was causing problems

  • Loading branch information...
1 parent 4f532ab commit 338b62896496c98719b571211affb17bdec7eaee @iamringo iamringo committed Jul 19, 2009
Showing with 6 additions and 4 deletions.
  1. +4 −3 app/models/punch_clock_set.rb
  2. +2 −1 app/models/user.rb
@@ -1,9 +1,10 @@
class PunchClockSet < ActiveRecord::Base
- has_and_belongs_to_many :users
+#TODO:There's no joined table here yet, so I've commented this out
+# has_and_belongs_to_many :users
has_many :punch_clocks
-
+
validates_presence_of :description
-
+
def running_time
no_of_sec = Time.now - self.created_at
[ no_of_sec / 3600, no_of_sec / 60 % 60, no_of_sec % 60 ].map{ |t| t.to_i.to_s.rjust(2, '0') }.join(':')
View
@@ -5,7 +5,8 @@ class User < ActiveRecord::Base
options.maintain_sessions false
end
has_and_belongs_to_many :roles
- has_and_belongs_to_many :punch_clock_sets
+#TODO:There's no joined table here yet, so I've commented this out
+# has_and_belongs_to_many :punch_clock_sets
has_many :departments_users
has_many :departments, :through => :departments_users
has_many :payforms

0 comments on commit 338b628

Please sign in to comment.