aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/extensions
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-12 23:31:18 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-12 23:31:18 -0700
commitb1acebaaf0823c093853ade5700bbf5117b4f31a (patch)
treeafb68e6d23f032802854e396e5f988aa1642c4d3 /lib/active_relation/extensions
parent2654c29bfdb2ccddfed8cceaaaba06e46892bdb9 (diff)
downloadrails-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.rb2
-rw-r--r--lib/active_relation/extensions/object.rb2
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