aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
AgeCommit message (Collapse)Author
2017-09-27Nested form for compliance control blockXinhui
Refs #4585
2017-09-27Remove commentsXinhui
2017-09-27Nested compliance control blockXinhui
Refs #4585
2017-09-27Fix STI subclasses not loaded on development envXinhui
Refs #4580
2017-09-27Manually specifying policy classes for ComplianceControl & childrenXinhui
Refs #4581
2017-09-27Merge pull request #78 from ↵Robert Dober
af83/3520-workbench--add-output-association-to-ReferentialSuite 3520 workbench add output association to referential suite
2017-09-26Refs: #4440@1.5h;Robert
ImportPolicy changing *.imports →' imports.*
2017-09-26add date filter to compliance_control_sets Refs #4466Guillaume
2017-09-25add compliance_check_sets structure Refs #3564Guillaume
2017-09-25Workbench: Ensure `output` attr is initialised when creating workbenchTeddy Wing
Since all `Workbench`es must have an associated `ReferentialSuite` via `output`, if none is provided when creating a new `Workbench`, create one automatically. This is done in a `before_validation` callback (eck, AR callbacks). In order for our prior 'should validate_presence_of' test to continue to work, we have to work around the new callback, otherwise Shoulda can't set `output` to `nil` to run its expectation and the test fails. Refs #3520
2017-09-25Workbench: Validate presence of `output`Teddy Wing
Ensure all workbenches always have an associated `ReferentialSuite` by validating presence of the `output` attribute. In order to pass the 'should have a valid factory' test, we need to define a `ReferentialSuite` factory and set up a default association on `output` in the `Workbench` factory. We also need to add set `output` when creating a `Workbench` in `spec/support/referential.rb`, otherwise we get a validation error that breaks the tests. Clean up the formatting of that call. In order to pass a `ReferentialSuite`, I just create one above, but I'm not sure if I should be using a `find_or_create` mechanism like the other associated objects do above. Refs #3520
2017-09-25Workbench: Add `output` associationTeddy Wing
The `output` attribute should be a `ReferentialSuite`. Refs #3520
2017-09-22Add `has_many` association between `Referential` and `ReferentialSuite`Teddy Wing
`ReferentialSuite` has many `Referential`s. Need to add a foreign key column to the `referentials` table to allow that to work. Refs #3519
2017-09-22Add `ReferentialSuite`Teddy Wing
This model is responsible for collecting referentials in order to merge them into a single referential. * `new` corresponds to a referential in the process of being validated * `current` corresponds to the most recently validated referential Refs #3519
2017-09-22Refs #4593cedricnjanga
Object ID => Change the way provider_id in constructed to replace every space with an underscore.
2017-09-21Vehicle journey message error update to show the sort_id and not the local_idcedricnjanga
2017-09-21Add the rest of compliance control modelscedricnjanga
2017-09-19Add the rest of the other compliance control modelscedricnjanga
2017-09-19Add compliance control models and some translationscedricnjanga
2017-09-19Merge branch 'master' into 4466-compliance_control_sets4466-compliance_control_setsGuillaume
2017-09-18add create/edit for compliance_control_set, add specsGuillaume
2017-09-18Fix table name compliance_check_result to compliance_check_message Refs #4390 @2Luc Donnet
2017-09-15Initialize first model for compliance_control STI Refs #3550 @4Luc Donnet
2017-09-14ComplianceControl Controller4467_compliance_control_crudXinhui
Refs #4467
2017-09-14Change wayback values in route Refs #3395 @4Luc Donnet
2017-09-13Add short_id method to Chouette::StifNetexObjectid classcedricnjanga
2017-09-12Merge branch 'master' into compliance_controlXinhui Xu
2017-09-12Merge pull request #63 from af83/4189-duplicate-routeLuc Donnet
4189 duplicate route
2017-09-12Edit object#local_id attribute orderXinhui
Refs #4453
2017-09-12Change the import filter to include two inputs and tweak ransack filter to ↵cedricnjanga
convert date object to dateTime object
2017-09-12Refs: #4189@2h; Fixing logical merging issues, preparing PRRobert
2017-09-11merged with masterRobert
2017-09-11Fixes #4189@4h Route DuplicationRobert
* Duplication of Route is triggered by link and UI forwarded to edit of duplicatee - Changing route, only POST duplicate_referential_line_route --> RoutesController#duplicate - Removing route GET duplicate_referential_line_route --> RoutesController#duplicate - Removing controller action RoutesController#post_duplicate * Link in Route Decorator depends on new policy RoutePolicy#decorate? * Adapting specs
2017-09-11Update of ReferentialsController#new :cedricnjanga
- Add some context to referential and workbench decorator to access current_referential and assign it to the cloned referential - Add a build_referential method to avoir duplicates of code (in the controller and in the model), need to clean a bit more - Need to add some Spec features to take into account the functional scope of the current_user
2017-09-11ImportMessage: Remove `dependent: :destroy` on :resource associationTeddy Wing
It doesn't really make sense to have a `dependent: :destroy` here. For one thing, the `Import` class has the necessary `dependent: :destroy` definitions to remove its associated objects when it gets deleted. At this point, according to Luc, we don't envision deleting `ImportResource`s separately from `Import`s. The other weird thing is that: * `ImportResource` has many `ImportMessage`s * `ImportMessage` has one `ImportResource` With the `dependent: :destroy` set up the way it is here on `ImportMessage`, we could potentially be deleting an `ImportResource` with other `ImportMessage` children that would then become orphaned. For both these reasons, it seems better to remove this trigger. Refs #4412
2017-09-08Disable uniqueness of name for referential because it stops import for same ↵Luc Donnet
referential Refs #4415 @1
2017-09-07Merge branch 'master' of github.com:AF83/stif-boivLuc Donnet
2017-09-07Fix import messages locales key in java process Refs #4370 @1Luc Donnet
2017-09-07Restore Referential#clone_schema invocation. Refs #4335Alban Peignier
2017-09-07Avoid Appartment schema creation when cloning is pending. Add a spec which ↵Alban Peignier
performs a real referential clone. Refs #4335
2017-09-07Set default value for data_source_refXinhui
Refs #4406
2017-09-06Merge branch 'master' of github.com:af83/stif-boivcedricnjanga
2017-09-06Fix import messages when referential can't be created. Delete unused sass ↵Luc Donnet
files. Refs #4259
2017-09-06Model ComplianceCheckResultXinhui
Refs #4390
2017-09-06Model ComplianceCheckResourceXinhui
Refs #4391
2017-09-06Resolve merge conflictcedricnjanga
2017-09-06Model ComplianceCheckXinhui
Refs #4388
2017-09-06Merge branch 'master' of github.com:AF83/stif-boivLuc Donnet
2017-09-06Fix import messages export to csv Refs #4259Luc Donnet
2017-09-06Updated imports#index date filter : used the same logic for the ↵cedricnjanga
Calendar#index date filter (ransackable scope) I realized that we could submit the form with incomplete date which caused an 500 error. So I added a small JS script to prevent user from subnitting filter form with incomplete dates Since it was really similar with previous work I added two folders : /helpers & /filters to be more DRY The JS files are loaded in 4 views for the moment, hence the update in the assets.rb file