aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/column.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2015-01-01 00:00:00 -0800
committerRyuta Kamizono <kamipo@gmail.com>2015-01-04 07:32:03 +0900
commit3225ebfa0632cd42a0fbcf0cbca36c7c06e54844 (patch)
tree67a4a7cf8d75aa5648f9fea21ab40be75705ec97 /activerecord/lib/active_record/connection_adapters/column.rb
parent4591b0fc041454f4ba4a83629b9bbca2a851969c (diff)
downloadrails-3225ebfa0632cd42a0fbcf0cbca36c7c06e54844.tar.gz
rails-3225ebfa0632cd42a0fbcf0cbca36c7c06e54844.tar.bz2
rails-3225ebfa0632cd42a0fbcf0cbca36c7c06e54844.zip
Prefer `array?` rather than `array`
Slightly refactoring `PostgreSQLColumn`. `array` should be readonly. `default_function` should be initialized by `super`. `sql_type` has been removed `[]`. Since we already choose to remove it we should not change.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/column.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/column.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb
index af307b57a4..65d8b1a8ab 100644
--- a/activerecord/lib/active_record/connection_adapters/column.rb
+++ b/activerecord/lib/active_record/connection_adapters/column.rb
@@ -30,13 +30,13 @@ module ActiveRecord
# <tt>company_name varchar(60)</tt>.
# 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, cast_type, sql_type = nil, null = true)
+ def initialize(name, default, cast_type, sql_type = nil, null = true, default_function = nil)
@name = name
@cast_type = cast_type
@sql_type = sql_type
@null = null
@default = default
- @default_function = nil
+ @default_function = default_function
end
def has_default?