aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-28 16:46:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-28 16:46:06 -0700
commitf4c12fcc4aa29081f5fe51fc3294ccef55280cc8 (patch)
treee7e1e8f69cef173af242d09772f6af4301e08d48
parent110f8f145c93fc1975dcaa03db1a908a7d1b823b (diff)
downloadrails-f4c12fcc4aa29081f5fe51fc3294ccef55280cc8.tar.gz
rails-f4c12fcc4aa29081f5fe51fc3294ccef55280cc8.tar.bz2
rails-f4c12fcc4aa29081f5fe51fc3294ccef55280cc8.zip
making select manager public
-rw-r--r--lib/arel/table.rb3
-rw-r--r--spec/crud_spec.rb1
-rw-r--r--spec/select_manager_spec.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb
index 3285037154..e71d7d392c 100644
--- a/lib/arel/table.rb
+++ b/lib/arel/table.rb
@@ -97,11 +97,12 @@ module Arel
columns.find { |column| column.name == name }
end
- private
def select_manager
SelectManager.new(@engine, self)
end
+ private
+
def attributes_for columns
return nil unless columns
diff --git a/spec/crud_spec.rb b/spec/crud_spec.rb
index 5c03857284..3485df6685 100644
--- a/spec/crud_spec.rb
+++ b/spec/crud_spec.rb
@@ -32,6 +32,7 @@ module Arel
it 'should call insert on the connection' do
table = Table.new :users
fc = FakeCrudder.new
+ fc.from table
fc.insert [[table[:id], 'foo']]
fc.engine.calls.find { |method, _|
method == :insert
diff --git a/spec/select_manager_spec.rb b/spec/select_manager_spec.rb
index 7002d937a2..e5b65b4698 100644
--- a/spec/select_manager_spec.rb
+++ b/spec/select_manager_spec.rb
@@ -27,7 +27,7 @@ module Arel
def quote_column_name thing; @engine.connection.quote_column_name thing end
def quote thing, column; @engine.connection.quote thing, column end
- def execute sql, name = nil
+ def execute sql, name = nil, *args
@executed << sql
end
alias :update :execute