scope_for_create always returns something

This commit is contained in:
Aaron Patterson
2010-11-30 15:39:49 -08:00
parent dccf624b64
commit 7ff980031b

View File

@@ -1830,7 +1830,9 @@ MSG
def populate_with_current_scope_attributes
if scope = self.class.send(:current_scoped_methods)
create_with = scope.scope_for_create
create_with.each { |att,value| self.respond_to?(:"#{att}=") && self.send("#{att}=", value) } if create_with
create_with.each { |att,value|
respond_to?(:"#{att}=") && send("#{att}=", value)
}
end
end