diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-31 13:57:52 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-31 14:03:28 -0800 |
commit | 4ccf8319bb3b6e9f5df507b4e9b58c649a3adc34 (patch) | |
tree | 026205e976fec0360d8699d5668c66770ed091fd | |
parent | 2e11213d62f25d41ccf77b3d0f5b69aad0bf165b (diff) | |
download | rails-4ccf8319bb3b6e9f5df507b4e9b58c649a3adc34.tar.gz rails-4ccf8319bb3b6e9f5df507b4e9b58c649a3adc34.tar.bz2 rails-4ccf8319bb3b6e9f5df507b4e9b58c649a3adc34.zip |
expand mulasgn for enhancing readability
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index bc8a6e9cd6..50b1a3f632 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -28,12 +28,15 @@ module ActiveRecord # It will be mapped to one of the standard Rails SQL types in the <tt>type</tt> attribute. # +null+ determines if this column allows +NULL+ values. def initialize(name, default, sql_type = nil, null = true) - @name, @sql_type, @null = name, sql_type, null - @limit, @precision, @scale = extract_limit(sql_type), extract_precision(sql_type), extract_scale(sql_type) - @type = simplified_type(sql_type) - @default = extract_default(default) - - @primary = nil + @name = name + @sql_type = sql_type + @null = null + @limit = extract_limit(sql_type) + @precision = extract_precision(sql_type) + @scale = extract_scale(sql_type) + @type = simplified_type(sql_type) + @default = extract_default(default) + @primary = nil end # Returns +true+ if the column is either of type string or text. |