1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
This commit is contained in:
Joshua Clayton 2012-05-05 02:59:13 -04:00
parent f1fd650048
commit e333dcf63a

View file

@ -9,8 +9,7 @@ module FactoryGirl
]
def self.aliases_for(attribute)
aliases.collect do |params|
pattern, replace = *params
aliases.map do |(pattern, replace)|
if pattern.match(attribute.to_s)
attribute.to_s.sub(pattern, replace).to_sym
end