Style Rails/IndexWith

This commit is contained in:
Maikel Linke
2023-04-14 16:18:35 +10:00
parent 33409725a5
commit 407fca17cb
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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