Permalink
Browse files

make the @negated information available to translators

  • Loading branch information...
1 parent d44d204 commit a8d2cdf409d42c3cf55889a1751b6d8d1c608568 @defunkt committed Feb 16, 2008
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/ambition/processors/base.rb
  2. +2 −2 lib/ambition/processors/select.rb
@@ -104,7 +104,7 @@ def self.translator(context, name = nil)
unless instance.respond_to? :context
klass.class_eval do
- attr_accessor :context
+ attr_accessor :context, :negated
def owner; @context.owner end
def clauses; @context.clauses end
def stash; @context.stash end
@@ -95,10 +95,10 @@ def negate_operator(operator)
end
def negate
- @negated = true
+ @negated = translator.negated = true
yield
ensure
- @negated = false
+ @negated = translator.negated = false
end
end
end

0 comments on commit a8d2cdf

Please sign in to comment.