demarches-normaliennes/app/models
Pierre de La Morinerie e6cf07b810 stats: move date formatting out of the Stat model
Before this commit, the monthly dossiers count was serialized into the
Stat record using human-formatted dates, as:

```ruby
s.dossiers_in_the_last_4_months = {
  "octobre 2021"=>409592,
  "novembre 2021"=>497823,
  "décembre 2021"=>38170,
  "janvier 2022"=>0
}
```

Turns out the ordering of keys in a serialized hash is not guaranteed.
After a round-trip to the database, the keys will be wrongly sorted.

Instead we want to save raw Date objects, which will preserve the
ordering. The date formatting can be applied at display-time by the
controller.

Fix #6848
2022-02-02 14:13:53 +01:00
..
champs feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
concerns fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
mails Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
types_de_champ feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
.keep First Commit 2015-08-10 11:05:06 +02:00
administrateur.rb merge admin 2021-10-19 16:12:42 +02:00
administrateurs_instructeur.rb merge instructeur 2021-10-07 15:51:31 +02:00
administrateurs_procedure.rb feat(manager): add become administrateur button in manager (with 24h expiration) 2021-10-07 11:32:12 +02:00
agent_connect_client.rb manage AgentConnect callback 2021-11-23 14:17:59 +01:00
api_entreprise_token.rb zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
application_record.rb Add id argument to most collections on dossier 2021-03-02 12:42:22 +01:00
archive.rb Revert "Revert "Export de tous les dossier d'une démarche"" 2021-04-29 17:29:47 +02:00
assign_to.rb Remove ignored_columns 2021-04-13 17:00:07 +01:00
attestation.rb models: require belong_to associations on attestation 2020-08-18 15:57:36 +02:00
attestation_template.rb Revert "feat(attestation): revise attestations" 2022-01-25 18:26:34 +01:00
avis.rb l'expert ne voit pas les dossiers supprimés par l'instructeur 2022-01-03 11:51:25 +01:00
bill_signature.rb fix(virus scan): prevent virus scan on archives and signatures uploads 2021-09-07 14:21:48 +02:00
bulk_message.rb add procedure to bulk messages 2021-08-04 11:35:06 +02:00
champ.rb a11y(champs): expose ids for UI on champ 2022-01-05 12:33:40 +01:00
commentaire.rb models: remove custom code for file size validation message 2021-11-24 10:06:45 +01:00
current.rb Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
current_confirmation.rb mailers: add procedure context to the confirmation link 2020-02-25 11:45:36 +00:00
deleted_dossier.rb fix(dossiers): wrap dossier discard in a transaction 2021-11-02 18:17:35 +01:00
demande.rb [fix #1601] show pipedrive demandes in manager 2018-03-22 15:37:16 +01:00
dossier.rb modify models 2022-01-27 17:01:27 +01:00
dossier_operation_log.rb fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
dossier_transfer.rb fix(transfer): remove discarded dossiers from transfers 2021-10-26 10:41:01 +02:00
dossier_transfer_log.rb feat(dossier): add dossier transfer models 2021-09-08 14:39:46 +02:00
entreprise.rb Add default nil value for numero_tva_intracommunautaire 2021-03-16 12:57:10 +01:00
etablissement.rb fix(virus scan): prevent virus scan on archives and signatures uploads 2021-09-07 14:21:48 +02:00
exercice.rb models: require belong_to associations on exercice 2020-08-18 15:57:36 +02:00
expert.rb rename hidden_by_instructeur by hidden_by_administration 2022-01-03 11:51:25 +01:00
experts_procedure.rb add revoked at to experts_procedures 2021-04-06 10:39:22 +02:00
export.rb fix(archives): only export dossiers in archive groupe_instructeurs 2022-01-18 11:16:20 +01:00
follow.rb models: require belong_to associations on follow 2020-08-18 15:57:37 +02:00
france_connect_information.rb merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
france_connect_particulier_client.rb FC initializers: remove Hashie 2018-01-15 17:08:38 +01:00
geo_area.rb Do not crash when properties is nil 2021-05-26 12:40:07 +02:00
groupe_instructeur.rb fix(instructeur): copy notifications settings from previous groupe instructeur 2021-12-23 13:55:25 +01:00
individual.rb affiche Madame ou Monsieur 2020-12-08 21:30:54 +01:00
instructeur.rb modify models 2022-01-27 17:01:27 +01:00
invite.rb use after_create instead of after_save 2020-09-29 18:15:38 +00:00
merge_log.rb Add merge log 2021-10-28 14:39:13 +02:00
module_api_carto.rb models: require belong_to associations on module_api_carto 2020-08-18 15:57:37 +02:00
null_zone.rb superadmin can display list of procedures without zone 2021-12-23 19:18:46 +01:00
procedure.rb validators: rename revisions namespace to types_de_champ 2022-02-01 12:37:16 +01:00
procedure_overview.rb fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
procedure_presentation.rb fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
procedure_revision.rb Revert "feat(attestation): revise attestations" 2022-01-25 18:26:34 +01:00
procedure_revision_type_de_champ.rb task(type_de_champ): migrate type_de_champ parent_id 2021-12-06 21:45:54 +01:00
service.rb models: require belong_to associations on service 2020-08-18 15:57:37 +02:00
siret.rb Do one thing per line 2018-10-01 16:15:46 +02:00
stat.rb stats: move date formatting out of the Stat model 2022-02-02 14:13:53 +01:00
super_admin.rb models: extract password complexity to a concern 2021-09-09 09:40:39 -05:00
traitement.rb Fix date_trunc sql queries for timezoned forks 2021-12-14 08:50:09 +01:00
trusted_device_token.rb models: require belong_to associations on trusted_device_token 2020-08-18 15:57:37 +02:00
type_de_champ.rb feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
user.rb fix(profil_controller#update_email): ensure we are not merging same account 2021-12-29 13:36:47 +01:00
zone.rb superadmin can get procedures from zone 2021-12-23 19:07:42 +01:00