diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-11 23:39:40 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-11 23:39:40 -0700 |
commit | 8a62a733c107a33edee8cabc908c3ebc3b280e8b (patch) | |
tree | 30d088f5ef2798ee164fb6fe4ea253cef20b3f19 /lib/active_relation/predicates.rb | |
parent | 12ef6a5ad15078d2f634d3c6cdfc453848f90122 (diff) | |
download | rails-8a62a733c107a33edee8cabc908c3ebc3b280e8b.tar.gz rails-8a62a733c107a33edee8cabc908c3ebc3b280e8b.tar.bz2 rails-8a62a733c107a33edee8cabc908c3ebc3b280e8b.zip |
renamed strategy method to format
- strategy (the method on scalar and attribute) is a complex double-dispatching
scheme to format (to_sql) a scalar in the light of the particular attribute;
that is, it casts strings to integers if the column is int, etc.
Diffstat (limited to 'lib/active_relation/predicates.rb')
-rw-r--r-- | lib/active_relation/predicates.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/active_relation/predicates.rb b/lib/active_relation/predicates.rb index ba926a86e5..12ddd1b48d 100644 --- a/lib/active_relation/predicates.rb +++ b/lib/active_relation/predicates.rb @@ -25,7 +25,7 @@ module ActiveRelation end def to_sql(strategy = nil) - "#{operand1.to_sql(operand2.strategy)} #{predicate_sql} #{operand2.to_sql(operand1.strategy)}" + "#{operand2.format(operand1)} #{predicate_sql} #{operand1.format(operand2)}" end def descend |