mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Style Rails/IndexWith
This commit is contained in:
@@ -37,7 +37,7 @@ class JsonApiSchema
|
||||
end
|
||||
|
||||
def relationship_properties
|
||||
relationships.to_h { |name| [name, relationship_schema(name)] }
|
||||
relationships.index_with { |name| relationship_schema(name) }
|
||||
end
|
||||
|
||||
# Example
|
||||
|
||||
@@ -15,7 +15,7 @@ module Reporting
|
||||
end
|
||||
|
||||
def custom_headers
|
||||
data_attributes.map { |attr| [attr, I18n.t("header.#{attr}", scope: i18n_scope)] }.to_h
|
||||
data_attributes.index_with { |attr| I18n.t("header.#{attr}", scope: i18n_scope) }
|
||||
end
|
||||
|
||||
def i18n_scope
|
||||
|
||||
Reference in New Issue
Block a user