refactor(dossier): predicates methods must return boolean
This commit is contained in:
parent
a54f022353
commit
f6366a9cd3
1 changed files with 6 additions and 6 deletions
|
@ -38,15 +38,15 @@ module DossierCloneConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def forked_with_changes?
|
def forked_with_changes?
|
||||||
if forked_diff.present?
|
return false if forked_diff.blank?
|
||||||
forked_diff.values.any?(&:present?) || forked_groupe_instructeur_changed?
|
|
||||||
end
|
forked_diff.values.any?(&:present?) || forked_groupe_instructeur_changed?
|
||||||
end
|
end
|
||||||
|
|
||||||
def champ_forked_with_changes?(champ)
|
def champ_forked_with_changes?(champ)
|
||||||
if forked_diff.present?
|
return false if forked_diff.blank?
|
||||||
forked_diff.values.any? { |champs| champs.any? { _1.public_id == champ.public_id } }
|
|
||||||
end
|
forked_diff.values.any? { |champs| champs.any? { _1.public_id == champ.public_id } }
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_diff(editing_fork)
|
def make_diff(editing_fork)
|
||||||
|
|
Loading…
Add table
Reference in a new issue