diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-06-30 14:18:31 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-06-30 14:18:31 -0500 |
commit | 6727e3c9e7eca006e5221739dc72694d2c1e024d (patch) | |
tree | 53fd4f62545ad14ddc4a1593b77a426a0d20e31a /activerecord | |
parent | 6b9d1a0db2f7829509689d244d6a5eda5210401d (diff) | |
download | rails-6727e3c9e7eca006e5221739dc72694d2c1e024d.tar.gz rails-6727e3c9e7eca006e5221739dc72694d2c1e024d.tar.bz2 rails-6727e3c9e7eca006e5221739dc72694d2c1e024d.zip |
update AR::SchemaStatements#column_exists? documentation [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index f5794a4e54..50da373c6a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -57,7 +57,6 @@ module ActiveRecord # Checks to see if a column exists in a given table. # - # === Examples # # Check a column exists # column_exists?(:suppliers, :name) # @@ -65,7 +64,10 @@ module ActiveRecord # column_exists?(:suppliers, :name, :string) # # # Check a column exists with a specific definition - # column_exists?(:suppliers, :name, :string, :limit => 100) + # column_exists?(:suppliers, :name, :string, limit: 100) + # column_exists?(:suppliers, :name, :string, default: 'default' + # column_exists?(:suppliers, :name, :string, null: false) + # column_exists?(:suppliers, :tax, :decimal, precision: 8, scale: 2) def column_exists?(table_name, column_name, type = nil, options = {}) columns(table_name).any?{ |c| c.name == column_name.to_s && (!type || c.type == type) && |