diff options
| author | Michel Etienne | 2012-07-10 15:41:07 +0200 | 
|---|---|---|
| committer | Michel Etienne | 2012-07-10 15:41:07 +0200 | 
| commit | 48417d275b9a780376a199d62d3139910eb5fa84 (patch) | |
| tree | 2b00650f8eac83194081531474b5a90718a35d0f /app/models/clean_up.rb | |
| parent | 981b65e1e3776fc49680658fc0b66227d4a7ce1c (diff) | |
| download | chouette-core-48417d275b9a780376a199d62d3139910eb5fa84.tar.bz2 | |
reprise clean_up and test_sheet
Diffstat (limited to 'app/models/clean_up.rb')
| -rw-r--r-- | app/models/clean_up.rb | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/app/models/clean_up.rb b/app/models/clean_up.rb index 2d8e4c693..69ebcbc5d 100644 --- a/app/models/clean_up.rb +++ b/app/models/clean_up.rb @@ -20,6 +20,34 @@ class CleanUp      false      end  +  def notice +    notice = Array.new +    notice << t('clean_ups.success_tm', :count => clean_up.time_table_count.to_s) +    if (clean_up.vehicle_journey_count > 0)  +      notice << t('clean_ups.success_vj', :count => clean_up.vehicle_journey_count.to_s) +    end    +    if (clean_up.journey_pattern_count > 0)  +      notice << t('clean_ups.success_jp', :count => clean_up.journey_pattern_count.to_s) +    end    +    if (clean_up.route_count > 0)  +      notice << t('clean_ups.success_r', :count => clean_up.route_count.to_s) +    end    +    if (clean_up.line_count > 0)  +      notice << t('clean_ups.success_l', :count => clean_up.line_count.to_s) +    end    +    if (clean_up.company_count > 0)  +      notice << t('clean_ups.success_c', :count => clean_up.company_count.to_s) +    end    +    if (clean_up.network_count > 0)  +      notice << t('clean_ups.success_n', :count => clean_up.network_count.to_s) +    end    +    if (clean_up.stop_count > 0)  +      notice << t('clean_ups.success_sa', :count => clean_up.stop_count.to_s) +    end  +    notice   + +  end +    def clean      # find and remove time_tables  | 
