aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorPaul Gallagher <gallagher.paul@gmail.com>2011-06-10 22:48:58 +0800
committerPaul Gallagher <gallagher.paul@gmail.com>2011-06-10 22:48:58 +0800
commit019c263633242f4329f44f863705435f58e1d884 (patch)
treecd6b87d0b27d6edbd81f2234e52e0959f6d5d536 /activerecord/lib
parent5c7f8c929b228063b224eaa17360dcc105788296 (diff)
downloadrails-019c263633242f4329f44f863705435f58e1d884.tar.gz
rails-019c263633242f4329f44f863705435f58e1d884.tar.bz2
rails-019c263633242f4329f44f863705435f58e1d884.zip
apply private method indentation convention
* tidy test code and fix my typo
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 2a3ee33e3e..0ef871749f 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -666,7 +666,7 @@ module ActiveRecord
SQL
end
- # Returns true of table exists.
+ # Returns true if table exists.
# If the schema is not specified as part of +name+ then it will only find tables within
# the current schema search path (regardless of permissions to access tables in other schemas)
def table_exists?(name)
@@ -981,27 +981,27 @@ module ActiveRecord
end
private
- def exec_no_cache(sql, binds)
- @connection.async_exec(sql)
- end
-
- def exec_cache(sql, binds)
- unless @statements.key? sql
- nextkey = "a#{@statements.length + 1}"
- @connection.prepare nextkey, sql
- @statements[sql] = nextkey
+ def exec_no_cache(sql, binds)
+ @connection.async_exec(sql)
end
- key = @statements[sql]
+ def exec_cache(sql, binds)
+ unless @statements.key? sql
+ nextkey = "a#{@statements.length + 1}"
+ @connection.prepare nextkey, sql
+ @statements[sql] = nextkey
+ end
- # Clear the queue
- @connection.get_last_result
- @connection.send_query_prepared(key, binds.map { |col, val|
- type_cast(val, col)
- })
- @connection.block
- @connection.get_last_result
- end
+ key = @statements[sql]
+
+ # Clear the queue
+ @connection.get_last_result
+ @connection.send_query_prepared(key, binds.map { |col, val|
+ type_cast(val, col)
+ })
+ @connection.block
+ @connection.get_last_result
+ end
# The internal PostgreSQL identifier of the money data type.
MONEY_COLUMN_TYPE_OID = 790 #:nodoc:
@@ -1106,9 +1106,9 @@ module ActiveRecord
$1.strip if $1
end
- def table_definition
- TableDefinition.new(self)
- end
+ def table_definition
+ TableDefinition.new(self)
+ end
end
end
end