mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
scope_for_create always returns something
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user