1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #28487 from kamipo/remove_duplicated_columns_definition

Remove duplicated `columns` definition
This commit is contained in:
Rafael França 2017-03-20 14:21:04 -04:00 committed by GitHub
commit eeb8c3c246
2 changed files with 5 additions and 11 deletions

View file

@ -105,10 +105,12 @@ module ActiveRecord
indexes(table_name).any? { |i| checks.all? { |check| check[i] } }
end
# Returns an array of Column objects for the table specified by +table_name+.
# See the concrete implementation for details on the expected parameter values.
# Returns an array of +Column+ objects for the table specified by +table_name+.
def columns(table_name)
raise NotImplementedError, "#columns is not implemented"
table_name = table_name.to_s
column_definitions(table_name).map do |field|
new_column_from_field(table_name, field)
end
end
# Checks to see if a column exists in a given table.

View file

@ -162,14 +162,6 @@ module ActiveRecord
SchemaCreation.new self
end
# Returns an array of +Column+ objects for the table specified by +table_name+.
def columns(table_name) # :nodoc:
table_name = table_name.to_s
column_definitions(table_name).map do |field|
new_column_from_field(table_name, field)
end
end
# this method must only be called while holding connection pool's mutex
def lease
if in_use?