Skip to content
Browse files

Changed preloading logic for `[]` in Scope::Model

  • Loading branch information...
1 parent deaf27e commit cbe9562bc14d83880172ee47b6d917143ba4a5db @serebryakov serebryakov committed May 28, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/lib/scope/model.rb
View
4 lib/lib/scope/model.rb
@@ -46,7 +46,7 @@ def from(adapter, options = {})
# In addition to the original method, preloads the model.
##
def [](name)
- super || (@loaded ? nil : load[name])
+ @arbitrary[name] || (@loaded ? super(name) : load[name])
end
##
@@ -112,7 +112,7 @@ def nil!
# In addition to the original method, preloads the model.
##
def get_attribute(name, *args)
- @loaded ? super : load.send(name, *args)
+ @loaded ? super(name, *args) : load.send(name, *args)
end
##

0 comments on commit cbe9562

Please sign in to comment.
Something went wrong with that request. Please try again.