Commit graph

77 commits

Author SHA1 Message Date
Pierre de La Morinerie
51aacabf13 models: fix touch not propagating when using nested attributes
Sometimes, when using nested attributes, touch doesn’t propagate to
parent relationships. (see https://github.com/rails/rails/issues/26726)

Specifically, this happens in our app when updating a dossier with
only new attachements (but without changing the value of any fields).

To work around this, we need to define the parent relationship
explicitely. This is good practice anyway.

Fix #3906
2019-06-17 13:44:07 +02:00
Paul Chavard
91f2d7d706 Remove deprecated virus_scan model 2019-05-03 11:07:19 +02:00
Paul Chavard
8d093bd9ba Fix missing dossier_id on champs inside repetition 2019-04-18 16:55:35 +02:00
simon lehericey
2f66625f18 Manager: improve dossier view 2019-02-19 14:30:14 +01:00
Paul Chavard
071448e1d9 Champ Repetition dossier editor 2019-02-04 16:19:07 +01:00
gregoirenovel
866c74ce63 Add Champ#for_api 2019-01-08 12:32:27 +01:00
gregoirenovel
66d1b7ba10 Use ternary conditions 2019-01-08 12:32:26 +01:00
gregoirenovel
9e42190148 Remove the proxy value_for_export method
Overload for_export instead
2019-01-08 12:32:26 +01:00
gregoirenovel
7cd50531cf Remove the proxy string_value method
Overload to_s instead
2019-01-08 12:32:26 +01:00
gregoirenovel
186e362701 Enable the Layout/SpaceInsideArrayLiteralBrackets 2019-01-03 10:53:50 +01:00
Paul Chavard
5d1c24f3d8 Add type de champ repetition models (with row) 2018-12-19 15:31:11 +01:00
Paul Chavard
6706b9004f Fix includes on api queries 2018-11-08 14:45:09 +01:00
Paul Chavard
c8c75fc254 Better handle empty user selection layers 2018-10-23 09:35:25 +02:00
Frederic Merizen
0e639030f9 [#2179] Generate denormalized search terms value for Dossier 2018-07-27 11:11:52 +02:00
Frederic Merizen
7fdb523b1a We can use the shorter syntax fort ordered_champs(_private)
now that the old preview is gone
2018-06-28 10:27:07 +02:00
Frederic Merizen
2f206af0d6 [#1421] Make label clickable for drop-down lists 2018-06-27 17:02:46 +02:00
Frederic Merizen
e99931527b [#1421] Move pays to PaysChamp 2018-06-19 15:20:01 +02:00
Frederic Merizen
0239f936d7 [#1421] Move departements to DepartementChamp 2018-06-19 15:20:01 +02:00
Frederic Merizen
5b59bce0b6 [#1421] Move regions to RegionChamp 2018-06-19 15:20:01 +02:00
Frederic Merizen
95666238ea [#1421] Move piece justificative error code to piece justificative champ 2018-06-19 15:20:01 +02:00
Frederic Merizen
6af27a7190 [#1421] Move same_hour / same_minute to typed champ 2018-06-19 15:20:01 +02:00
Frederic Merizen
41734092b2 [#1421] Move type specific for_export code to typed champs 2018-06-19 15:20:01 +02:00
Frederic Merizen
ee8616fb97 [#1421] Move type specific to_s implementations to typed champs 2018-06-19 15:20:01 +02:00
Frederic Merizen
c2f199c5aa [#1421] Move piece justificative specific validation to PieceJustificativeChamp 2018-06-19 15:20:01 +02:00
Frederic Merizen
c690d3819e [#1421] Move type-specific before_save to typed champs 2018-06-19 15:20:01 +02:00
Mathieu Magnin
927cd3c6f4 Create virus scan model to store clamav result 2018-06-12 15:12:38 +02:00
Paul Chavard
e8f3fda1f0 Add STI champ models 2018-03-29 17:45:19 +02:00
Frederic Merizen
2fa88a432b Add missing brackets around parameters in method definitions 2018-03-20 17:54:51 +01:00
Paul Chavard
5faf4cdd84 Remove all references to old STI 2018-03-08 14:17:04 +01:00
gregoirenovel
0a9f442260 Enable some Rails cops 2018-03-06 17:18:44 +01:00
gregoirenovel
b33fd6dd37 Fix rubocop warnings 2018-03-02 15:42:20 +01:00
gregoirenovel
ee145180a3 Add a piece_justificative_file attribute to Champ 2018-02-15 11:15:23 +01:00
Paul Chavard
db42c0c0cf Fix public and private champs scopes 2018-02-14 18:13:23 +01:00
Paul Chavard
f80a9466b9 Delegate mandatory? to type_de_champ 2018-02-13 14:56:55 +01:00
Paul Chavard
2e4ada98e6 Add private columns to Champ and TypeDeChamp 2018-02-13 12:35:03 +01:00
Paul Chavard
52749713ab Remove ChampPublic/ChampPrivate STI 2018-02-13 12:07:13 +01:00
gregoirenovel
142241dd16 Remove notifications 2018-02-06 14:07:20 +01:00
Mathieu Magnin
50abb36c81 [Fix #1309] Format datetime before save 2018-01-30 13:49:16 +01:00
Paul Chavard
fdd6cedeb8 Remove data_provide and data_date_format attributes 2018-01-30 13:49:16 +01:00
Mathieu Magnin
469aca999b Revert "Remove data_provide and data_date_format attributes"
This reverts commit 273b3f2faf.
2018-01-19 13:20:53 +01:00
Paul Chavard
273b3f2faf Remove data_provide and data_date_format attributes 2018-01-18 15:13:48 +01:00
gregoirenovel
7c93b2a0c2 .map -> .pluck when possible 2018-01-16 13:23:29 +01:00
gregoirenovel
80ed589a17 Use string interpolation 2018-01-16 11:08:57 +01:00
gregoirenovel
c3754a173f Use map instead of inject 2018-01-16 11:08:56 +01:00
gregoirenovel
bbaebe0602 !foo.nil? -> foo.present? 2018-01-12 11:32:43 +01:00
Simon Lehericey
72bae2c374 [fix #504] Dossier: draft -> brouillon 2017-12-15 11:52:09 +01:00
Mathieu Magnin
53bb7b07da [Fix #775] If champ type is a multiple drop down list then display it properly 2017-12-01 12:23:19 +01:00
Mathieu Magnin
7bfafb6fc2 Fix export for yes_no champs 2017-11-21 10:36:24 +01:00
Simon Lehericey
155a5f7826 Notification: add methods to retrieve notifications 2017-11-10 16:29:44 +01:00
Simon Lehericey
f4a8ff31b9 Champ: export multiple_drop_down_list as a [].join(', ') 2017-10-30 17:14:31 +01:00