instance method
column_exists?
Ruby on Rails 4.0.13
Since v3.0.20Signature
column_exists?(column_name, type = nil, options = {})
Checks to see if a column exists. See SchemaStatements#column_exists?
Parameters
-
column_namereq -
typeopt = nil -
optionsopt = {}
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 364
def column_exists?(column_name, type = nil, options = {})
@base.column_exists?(@table_name, column_name, type, options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 364
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table