Sha256: 9d8e8892200c099a64890076766615903c02d9a7b97d2e54dc918ebd69b0581c
Contents?: true
Size: 400 Bytes
Versions: 4
Compression:
Stored size: 400 Bytes
Contents
class Task < ActiveRecord::Base belongs_to :project belongs_to :location belongs_to :user default_methods :is_active def is_active case when start_time && end_time (start_time .. end_time) === Time.now when start_time && end_time.nil? start_time <= Time.now when start_time.nil && end_time end_time >= Time.now else true end end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
dima-ruboss4ruby-1.1.0 | test/rails/models/task.rb |
dima-ruboss4ruby-1.1.1 | test/rails/models/task.rb |
ruboss4ruby-1.1.0 | test/rails/models/task.rb |
ruboss4ruby-1.1.1 | test/rails/models/task.rb |