app/models/concerns/clean_up_methods.rb
# EXTRA CLEANINGS, SELECTED FROM THE UI
EXTRA CLEANINGS, SELECTED FROM THE UI
EXTRA CLEANINGS SELECTED FROM THE UI
def clean_time_table_dates
    dates = Chouette::TimeTableDate.in_dates
    dates = case date_type.to_sym
    when :before
      dates.where('date < ?', self.begin_date)
    when :after
      dates.where('date > ?', self.begin_date)
    when :outside
      dates.where('date < ? OR date > ?', self.begin_date, self.end_date)
    when :between
      dates.where('date > ? AND date < ?', self.begin_date, self.end_date)
    end
    dates.clean!
  end
def clean_time_table_dates dates = Chouette :: TimeTableDate . in_dates dates = case date_type . to_sym when :before dates . where ( 'date < ?' , self . begin_date ) when :after dates . where ( 'date > ?' , self . begin_date ) when :outside dates . where ( 'date < ? OR date > ?' , self . begin_date , self . end_date ) when :between dates . where ( 'date > ? AND date < ?' , self . begin_date , self . end_date ) end dates . clean! end
EXTRA CLEANINGS, SELECTED FROM THE UI
EXTRA CLEANINGS SELECTED FROM THE UI