.sort_by(&:downcase) where text is translated
This commit is contained in:
parent
7589ff671c
commit
6e6235cea9
2 changed files with 3 additions and 3 deletions
|
|
@ -107,7 +107,7 @@ class Check < ApplicationRecord
|
||||||
def display_target_disabilities
|
def display_target_disabilities
|
||||||
%i[visual auditory physical cognitive].select { |d| send(:"#{d}?") }
|
%i[visual auditory physical cognitive].select { |d| send(:"#{d}?") }
|
||||||
.map { |d| I18n.t("disability.#{d}") }
|
.map { |d| I18n.t("disability.#{d}") }
|
||||||
.sort
|
.sort_by(&:downcase)
|
||||||
.join(", ")
|
.join(", ")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ class Check < ApplicationRecord
|
||||||
applicable_to_non_web
|
applicable_to_non_web
|
||||||
applicable_to_web].select { |a| send(:"#{a}?") }
|
applicable_to_web].select { |a| send(:"#{a}?") }
|
||||||
.map { |a| I18n.t("applicability.#{a}") }
|
.map { |a| I18n.t("applicability.#{a}") }
|
||||||
.sort
|
.sort_by(&:downcase)
|
||||||
.join(", ")
|
.join(", ")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ div id=dom_id(check)
|
||||||
td = check.principle&.t_name
|
td = check.principle&.t_name
|
||||||
tr
|
tr
|
||||||
th = Standard.model_name.human(count: check.standard_ids.size)
|
th = Standard.model_name.human(count: check.standard_ids.size)
|
||||||
td = check.standards.map(&:t_name).sort.join(", ")
|
td = check.standards.map(&:t_name).sort_by(&:downcase).join(", ")
|
||||||
tr
|
tr
|
||||||
th = Check.human_attribute_name(:target_disabilities)
|
th = Check.human_attribute_name(:target_disabilities)
|
||||||
td = check.display_target_disabilities
|
td = check.display_target_disabilities
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue