aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/clean_up.rb
AgeCommit message (Collapse)Author
2018-05-30Refs #7227; Performance-oriented cleanup implementationZog
2018-05-15CleanUp: Add `#destroy_empty`6854-clean-up--destroy-routes-outside-referentialTeddy Wing
Gives us a single call site to trigger the destruction of vehicle journeys, journey patterns, and routes without content. This was previously done directly in the `#clean` method, but since it's not needed during referential duplication (only during merges), we don't want to enable it by default. Thus now to activate the same old functionality, you would create a `CleanUp` like this: CleanUp.new(methods: [:destroy_empty]) Refs #6854
2018-05-15CleanUp#clean: Replace `#destroy_*` calls with `#run_methods`Teddy Wing
It turns out that we don't care about destroying orphaned data. From Alban: > Quand on duplique un JDD, on lance un CleanUp, sauf que la partie > "suppression des données orphelines" n'intéresse personne au final. Replace the calls to `#destory_{vehicle_journeys,journey_patterns,routes}` with one to `#run_methods`. This change allows callers to run any cleanup methods defined in `CleanUp`. For example: CleanUp.new(methods: [:destory_routes]) But now by default, none of these destroy methods are run, saving us from doing extra work that it turns out we don't need to bother doing. Refs #6854
2018-05-14CleanUp: Add `#run_methods`Teddy Wing
This method is coupled with a new virtual attribute that can be used in the initializer like: CleanUp.new(methods: [:destroy_routes]) The method will run all methods specified in the `:methods` list. The plan is to replace the calls to `destroy_routes` etc. with a call to this method. The result will be a more configurable clean-up process, allowing users to selectively choose what to clean up by declaring what methods in the `CleanUp` model to call. Refs #6854
2018-05-14CleanUp: Remove `#destroy_vehicle_journeys_outside_referential`Teddy Wing
This method is superseded by `#destroy_routes_outside_referential`, which will cascade deletion to include vehicle journeys. Refs #6854
2018-05-14CleanUp: Add `#destroy_routes_outside_referential`Teddy Wing
This builds on `#destroy_vehicle_journeys_outside_referential` (which will soon be removed in favour of this new method). It destroys orphaned routes in a referential. Refs #6854
2018-04-27Refs #6572; New Referential#Show for noredy referentialsZog
2018-04-27Refs #6572; Use new statesZog
2018-04-24Restore 'data' clean (vehicle_journey/journey_pattern/route). Use ↵5372-clean-with-metadata-2Alban Peignier
referential metadata to clean routes. Make date_type/begin_date/end_date optionnal for internal usage. Refs #5372
2018-04-09Refs #6367; Add metadata to other versioned modelsZog
2017-08-02Refs: #4216@0.3h; Brute force change of `message_attributs` to ↵Robert
`message_attributes` in code (not migration or schema!!!)
2017-07-17Fix errors tranlations for clean upcedricnjanga
2017-07-12#4028 Clean Up end date must be greater than begin datecedricnjanga
2017-07-06Fix test according changes in model : boundaries are exclusive for between ↵cedricnjanga
clean up
2017-07-06Change format of error message format + some typoscedricnjanga
2017-07-06Change wording for clean up + add exclusive dates for between clean upaf83
2017-06-30Fix cleanup#destroy_time_tables should only destroy vehicle_journey of ↵Xinhui
deleted time_tables Refs #3917
2017-06-28Fix cleanup should only destroy vj without any time_tableXinhui
Refs #3917
2017-06-15Fix wrong method name on cleanupXinhui
Refs #3644
2017-06-13Clean edit condition on date included or notXinhui
2017-06-09Cleanup add TimeTableDate in_out:false to overlapping periodsXinhui
2017-06-08Wip Cleanup time_tables time_table_dates time_table_periodsXinhui
2017-06-05Referential Cleanup add date_typeXinhui
Refs #3662
2016-11-16Model CleanUp add end_dateXinhui
Refs #1934
2016-11-15Refactoring CleanUpResult as ActiveRecord modelXinhui
Refs #1933
2016-11-15Remove line and stop_area from cleanupXinhui
Refs #1933
2016-11-14Wip refactoring cleanup modelXinhui
Refs #1933
2016-11-10Wip refactoring CleanUp clean methodXinhui
Refs #1933
2015-05-21Refactor find_each with conditions option in CleanUpAlban Peignier
2013-02-07import foreign keys from ninoxeMichel Etienne
2012-10-16add group_of_line filter and summary on lines and add clean on empty groups ↵Michel Etienne
of lines
2012-08-30refactor clean_upMichel Etienne
2012-07-11correct notice methodMichel Etienne
2012-07-10reprise clean_up and test_sheetMichel Etienne
2012-07-09add clean up processMichel Etienne