Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't pass nil to translation defaults.
Workaround for rails/rails#19419
- Loading branch information
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,13 +87,11 @@ def document_show_field_label document, field | |
# Look up the label for the facet field | ||
def facet_field_label field | ||
field_config = blacklight_config.facet_fields[field] | ||
defaults = [:"blacklight.search.fields.facet.#{field}", :"blacklight.search.fields.#{field}"] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jcoyne
Author
Member
|
||
defaults << field_config.label if field_config | ||
defaults << field.to_s.humanize | ||
|
||
field_label( | ||
:"blacklight.search.fields.facet.#{field}", | ||
:"blacklight.search.fields.#{field}", | ||
(field_config.label if field_config), | ||
field.to_s.humanize | ||
) | ||
field_label *defaults | ||
end | ||
|
||
def view_label view | ||
|
@jcoyne do you remember why this is only needed for facets? Or should we do the same thing everywhere / add
#compact
to#field_label
?