mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Replace map.flatten with flat_map
This commit is contained in:
parent
2ef9a5fb0c
commit
23c0dc67b5
1 changed files with 2 additions and 2 deletions
|
@ -89,9 +89,9 @@ module FactoryGirl
|
||||||
end
|
end
|
||||||
|
|
||||||
def alias_names_to_ignore
|
def alias_names_to_ignore
|
||||||
@attribute_list.non_ignored.map do |attribute|
|
@attribute_list.non_ignored.flat_map do |attribute|
|
||||||
override_names.map { |override| attribute.name if attribute.alias_for?(override) && attribute.name != override && !ignored_attribute_names.include?(override) }
|
override_names.map { |override| attribute.name if attribute.alias_for?(override) && attribute.name != override && !ignored_attribute_names.include?(override) }
|
||||||
end.flatten.compact
|
end.compact
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue