Merge pull request #5881 from betagouv/ruby-2.7-keyword-arguments
This commit is contained in:
commit
08a588614f
4 changed files with 7 additions and 7 deletions
|
@ -792,9 +792,9 @@ GEM
|
||||||
xray-rails (0.3.2)
|
xray-rails (0.3.2)
|
||||||
rails (>= 3.1.0)
|
rails (>= 3.1.0)
|
||||||
zeitwerk (2.4.2)
|
zeitwerk (2.4.2)
|
||||||
zip_tricks (5.3.1)
|
zip_tricks (5.5.0)
|
||||||
zipline (1.2.1)
|
zipline (1.3.0)
|
||||||
rails (>= 3.2.1, < 6.1)
|
actionpack (>= 3.2.1, < 7.0)
|
||||||
zip_tricks (>= 4.2.1, < 6.0)
|
zip_tricks (>= 4.2.1, < 6.0)
|
||||||
zxcvbn-ruby (1.1.0)
|
zxcvbn-ruby (1.1.0)
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ class DossierMailer < ApplicationMailer
|
||||||
if interpolations[:state]
|
if interpolations[:state]
|
||||||
mailer_scope = self.class.mailer_name.tr('/', '.')
|
mailer_scope = self.class.mailer_name.tr('/', '.')
|
||||||
state = interpolations[:state].in?(Dossier::TERMINE) ? 'termine' : interpolations[:state]
|
state = interpolations[:state].in?(Dossier::TERMINE) ? 'termine' : interpolations[:state]
|
||||||
I18n.t("subject_#{state}", interpolations.merge(scope: [mailer_scope, action_name]))
|
I18n.t("subject_#{state}", **interpolations.merge(scope: [mailer_scope, action_name]))
|
||||||
else
|
else
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
|
@ -227,8 +227,8 @@ class Dossier < ApplicationRecord
|
||||||
user: [])
|
user: [])
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :with_notifiable_procedure, -> (notify_on_closed: false) do
|
scope :with_notifiable_procedure, -> (opts = { notify_on_closed: false }) do
|
||||||
states = notify_on_closed ? [:publiee, :close, :depubliee] : [:publiee, :depubliee]
|
states = opts[:notify_on_closed] ? [:publiee, :close, :depubliee] : [:publiee, :depubliee]
|
||||||
joins(:procedure)
|
joins(:procedure)
|
||||||
.where(procedures: { aasm_state: states })
|
.where(procedures: { aasm_state: states })
|
||||||
end
|
end
|
||||||
|
|
|
@ -71,7 +71,7 @@ module FeatureHelpers
|
||||||
|
|
||||||
# Add a new type de champ in the procedure editor
|
# Add a new type de champ in the procedure editor
|
||||||
def add_champ(options = {})
|
def add_champ(options = {})
|
||||||
add_champs(options)
|
add_champs(**options)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add several new type de champ in the procedure editor
|
# Add several new type de champ in the procedure editor
|
||||||
|
|
Loading…
Add table
Reference in a new issue