diff options
Diffstat (limited to 'app/models/chouette/time_table.rb')
| -rw-r--r-- | app/models/chouette/time_table.rb | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/app/models/chouette/time_table.rb b/app/models/chouette/time_table.rb index 033c39f1c..9af80fbb7 100644 --- a/app/models/chouette/time_table.rb +++ b/app/models/chouette/time_table.rb @@ -1,4 +1,5 @@  class Chouette::TimeTable < Chouette::TridentActiveRecord +  include TimeTableRestrictions    # FIXME http://jira.codehaus.org/browse/JRUBY-6358    self.primary_key = "id" @@ -29,6 +30,10 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord    validates_associated :dates    validates_associated :periods +  def presenter +    @presenter ||= ::TimeTablePresenter.new( self) +  end +    def self.start_validity_period      [Chouette::TimeTable.minimum(:start_date)].compact.min    end @@ -445,6 +450,5 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord      tt.comment = I18n.t("activerecord.copy", :name => self.comment)      tt    end -  end | 
