aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-05 08:15:07 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-05 08:15:22 -0700
commit1ca18a6f858a257cf495e9dec7573374b1f3b01e (patch)
tree65e7bfdb5f2c59297acd33c52a48498b9159f8a0 /activerecord/lib/active_record
parent8a657c0dc7e914111521eab1b0e69c20e57a8b3d (diff)
downloadrails-1ca18a6f858a257cf495e9dec7573374b1f3b01e.tar.gz
rails-1ca18a6f858a257cf495e9dec7573374b1f3b01e.tar.bz2
rails-1ca18a6f858a257cf495e9dec7573374b1f3b01e.zip
fixing whitespace errors
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/schema.rb2
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb18
2 files changed, 10 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/schema.rb b/activerecord/lib/active_record/schema.rb
index e2783087ec..c1bc3214ea 100644
--- a/activerecord/lib/active_record/schema.rb
+++ b/activerecord/lib/active_record/schema.rb
@@ -2,7 +2,7 @@ require 'active_support/core_ext/object/blank'
module ActiveRecord
# = Active Record Schema
- #
+ #
# Allows programmers to programmatically define a schema in a portable
# DSL. This means you can define tables, indexes, etc. without using SQL
# directly, so your applications can more easily support multiple
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index a4757773d8..e9af20e1b6 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -8,13 +8,13 @@ module ActiveRecord
# output format (i.e., ActiveRecord::Schema).
class SchemaDumper #:nodoc:
private_class_method :new
-
+
##
# :singleton-method:
- # A list of tables which should not be dumped to the schema.
+ # A list of tables which should not be dumped to the schema.
# Acceptable values are strings as well as regexp.
# This setting is only used if ActiveRecord::Base.schema_format == :ruby
- cattr_accessor :ignore_tables
+ cattr_accessor :ignore_tables
@@ignore_tables = []
def self.dump(connection=ActiveRecord::Base.connection, stream=STDOUT)
@@ -71,7 +71,7 @@ HEADER
else
raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.'
end
- end
+ end
table(tbl, stream)
end
end
@@ -87,7 +87,7 @@ HEADER
elsif @connection.respond_to?(:primary_key)
pk = @connection.primary_key(table)
end
-
+
tbl.print " create_table #{table.inspect}"
if columns.detect { |c| c.name == pk }
if pk != 'id'
@@ -105,7 +105,7 @@ HEADER
next if column.name == pk
spec = {}
spec[:name] = column.name.inspect
-
+
# AR has an optimisation which handles zero-scale decimals as integers. This
# code ensures that the dumper still dumps the column as a decimal.
spec[:type] = if column.type == :integer && [/^numeric/, /^decimal/].any? { |e| e.match(column.sql_type) }
@@ -148,7 +148,7 @@ HEADER
tbl.puts " end"
tbl.puts
-
+
indexes(table, tbl)
tbl.rewind
@@ -158,7 +158,7 @@ HEADER
stream.puts "# #{e.message}"
stream.puts
end
-
+
stream
end
@@ -172,7 +172,7 @@ HEADER
value.inspect
end
end
-
+
def indexes(table, stream)
if (indexes = @connection.indexes(table)).any?
add_index_statements = indexes.map do |index|