mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Cleanup
This commit is contained in:
parent
f1fd650048
commit
e333dcf63a
1 changed files with 1 additions and 2 deletions
|
@ -9,8 +9,7 @@ module FactoryGirl
|
||||||
]
|
]
|
||||||
|
|
||||||
def self.aliases_for(attribute)
|
def self.aliases_for(attribute)
|
||||||
aliases.collect do |params|
|
aliases.map do |(pattern, replace)|
|
||||||
pattern, replace = *params
|
|
||||||
if pattern.match(attribute.to_s)
|
if pattern.match(attribute.to_s)
|
||||||
attribute.to_s.sub(pattern, replace).to_sym
|
attribute.to_s.sub(pattern, replace).to_sym
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue