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

Remove useless argument in #columns.

This commit is contained in:
Sebastian Martinez 2012-02-02 10:34:17 -02:00
parent 3ccbc619e4
commit dcd74eb519
6 changed files with 7 additions and 7 deletions

View file

@ -56,7 +56,7 @@ module ActiveRecord
# Returns an array of Column objects for the table specified by +table_name+.
# See the concrete implementation for details on the expected parameter values.
def columns(table_name, name = nil) end
def columns(table_name) end
# Checks to see if a column exists in a given table.
#

View file

@ -409,7 +409,7 @@ module ActiveRecord
end
# Returns an array of +Column+ objects for the table specified by +table_name+.
def columns(table_name, name = nil)#:nodoc:
def columns(table_name)#:nodoc:
sql = "SHOW FULL FIELDS FROM #{quote_table_name(table_name)}"
execute_and_free(sql, 'SCHEMA') do |result|
each_hash(result).map do |field|

View file

@ -891,7 +891,7 @@ module ActiveRecord
end
# Returns the list of all column definitions for a table.
def columns(table_name, name = nil)
def columns(table_name)
# Limit, precision, and scale are all handled by the superclass.
column_definitions(table_name).collect do |column_name, type, default, notnull|
PostgreSQLColumn.new(column_name, default, type, notnull == 'f')

View file

@ -324,7 +324,7 @@ module ActiveRecord
end
# Returns an array of +SQLiteColumn+ objects for the table specified by +table_name+.
def columns(table_name, name = nil) #:nodoc:
def columns(table_name) #:nodoc:
table_structure(table_name).map do |field|
case field["dflt_value"]
when /^null$/i

View file

@ -229,8 +229,8 @@ module ActiveRecord
end
end
def columns(tbl_name, log_msg)
@columns ||= klass.connection.columns(tbl_name, log_msg)
def columns(tbl_name)
@columns ||= klass.connection.columns(tbl_name)
end
def reset_column_information

View file

@ -33,7 +33,7 @@ module ActiveRecord
options[:null])
end
def columns(table_name, message)
def columns(table_name)
@columns[table_name]
end
end