feat(i18n): expose locale on dossier and deleted_dossier
This commit is contained in:
parent
f1ff6da81b
commit
ff7fa4d895
2 changed files with 8 additions and 0 deletions
|
@ -47,4 +47,8 @@ class DeletedDossier < ApplicationRecord
|
||||||
def procedure_removed?
|
def procedure_removed?
|
||||||
reason == self.class.reasons.fetch(:procedure_removed)
|
reason == self.class.reasons.fetch(:procedure_removed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def user_locale
|
||||||
|
User.find_by(id: user_id)&.locale || I18n.default_locale
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -921,6 +921,10 @@ class Dossier < ApplicationRecord
|
||||||
update_column(:api_entreprise_job_exceptions, exceptions)
|
update_column(:api_entreprise_job_exceptions, exceptions)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def user_locale
|
||||||
|
user&.locale || I18n.default_locale
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def defaut_groupe_instructeur?
|
def defaut_groupe_instructeur?
|
||||||
|
|
Loading…
Reference in a new issue