Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove useless argument in #columns.

  • Loading branch information...
commit dcd74eb519c352c732fd593ecebaacce2e7560cf 1 parent 3ccbc61
@smartinez87 authored
View
2  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -56,7 +56,7 @@ def index_exists?(table_name, column_name, options = {})
# 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
2  activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -409,7 +409,7 @@ def indexes(table_name, name = nil) #:nodoc:
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
2  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -891,7 +891,7 @@ def indexes(table_name, name = nil)
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
2  activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -324,7 +324,7 @@ def table_exists?(name)
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
4 activerecord/lib/active_record/reflection.rb
@@ -229,8 +229,8 @@ def counter_cache_column
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
2  activerecord/test/active_record/connection_adapters/fake_adapter.rb
@@ -33,7 +33,7 @@ def merge_column(table_name, name, sql_type = nil, options = {})
options[:null])
end
- def columns(table_name, message)
+ def columns(table_name)
@columns[table_name]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.