aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/time_table.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-08-21 14:09:13 +0200
committercedricnjanga2017-08-21 17:34:04 +0200
commitcb6536cb9d3911d6c66fa98899b3e36a93b1ed06 (patch)
treead70ea81ebefc4871bfb9443c3479352a2dc63a0 /app/models/chouette/time_table.rb
parent25d8bd65e984bdb447e6e9b25dafd30070ef029d (diff)
downloadchouette-core-cb6536cb9d3911d6c66fa98899b3e36a93b1ed06.tar.bz2
Refs #4246 Fix combinaitions to only consider effective days for the two tt
Diffstat (limited to 'app/models/chouette/time_table.rb')
-rw-r--r--app/models/chouette/time_table.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/chouette/time_table.rb b/app/models/chouette/time_table.rb
index 97d2e7556..3f56f6a1d 100644
--- a/app/models/chouette/time_table.rb
+++ b/app/models/chouette/time_table.rb
@@ -487,7 +487,7 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord
def merge!(another_tt)
transaction do
days = [].tap do |array|
- array.push(*self.included_days_in_dates_and_periods, *another_tt.effective_days)
+ array.push(*self.effective_days, *another_tt.effective_days)
array.uniq!
end
@@ -516,7 +516,7 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord
def intersect!(another_tt)
transaction do
days = [].tap do |array|
- array.push(*self.included_days_in_dates_and_periods)
+ array.push(*self.effective_days)
array.delete_if {|day| !another_tt.effective_days.include?(day) }
array.uniq!
end
@@ -536,7 +536,7 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord
def disjoin!(another_tt)
transaction do
days = [].tap do |array|
- array.push(*self.included_days_in_dates_and_periods)
+ array.push(*self.effective_days)
array.delete_if {|day| another_tt.effective_days.include?(day) }
array.uniq!
end