diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-12 23:31:18 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-12 23:31:18 -0700 |
commit | b1acebaaf0823c093853ade5700bbf5117b4f31a (patch) | |
tree | afb68e6d23f032802854e396e5f988aa1642c4d3 /lib/active_relation/extensions | |
parent | 2654c29bfdb2ccddfed8cceaaaba06e46892bdb9 (diff) | |
download | rails-b1acebaaf0823c093853ade5700bbf5117b4f31a.tar.gz rails-b1acebaaf0823c093853ade5700bbf5117b4f31a.tar.bz2 rails-b1acebaaf0823c093853ade5700bbf5117b4f31a.zip |
- renamed scalar to value
- added better test coverage and documentation of binary spec #to_sql
Diffstat (limited to 'lib/active_relation/extensions')
-rw-r--r-- | lib/active_relation/extensions/array.rb | 2 | ||||
-rw-r--r-- | lib/active_relation/extensions/object.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/active_relation/extensions/array.rb b/lib/active_relation/extensions/array.rb index aa4354a78a..4bd20d8121 100644 --- a/lib/active_relation/extensions/array.rb +++ b/lib/active_relation/extensions/array.rb @@ -2,7 +2,7 @@ class Array def to_hash Hash[*flatten] end - + def to_sql(strategy = nil) "(#{collect(&:to_sql).join(', ')})" end diff --git a/lib/active_relation/extensions/object.rb b/lib/active_relation/extensions/object.rb index c1269ee37b..ab874150ed 100644 --- a/lib/active_relation/extensions/object.rb +++ b/lib/active_relation/extensions/object.rb @@ -8,7 +8,7 @@ class Object end def bind(relation) - ActiveRelation::Scalar.new(self, relation) + ActiveRelation::Value.new(self, relation) end def metaclass |