Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove useless argument in #columns.

  • Loading branch information...
commit dcd74eb519c352c732fd593ecebaacce2e7560cf 1 parent 3ccbc61
Sebastian Martinez authored
2  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -56,7 +56,7 @@ def index_exists?(table_name, column_name, options = {})
56 56
57 57 # Returns an array of Column objects for the table specified by +table_name+.
58 58 # See the concrete implementation for details on the expected parameter values.
59   - def columns(table_name, name = nil) end
  59 + def columns(table_name) end
60 60
61 61 # Checks to see if a column exists in a given table.
62 62 #
2  activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -409,7 +409,7 @@ def indexes(table_name, name = nil) #:nodoc:
409 409 end
410 410
411 411 # Returns an array of +Column+ objects for the table specified by +table_name+.
412   - def columns(table_name, name = nil)#:nodoc:
  412 + def columns(table_name)#:nodoc:
413 413 sql = "SHOW FULL FIELDS FROM #{quote_table_name(table_name)}"
414 414 execute_and_free(sql, 'SCHEMA') do |result|
415 415 each_hash(result).map do |field|
2  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -891,7 +891,7 @@ def indexes(table_name, name = nil)
891 891 end
892 892
893 893 # Returns the list of all column definitions for a table.
894   - def columns(table_name, name = nil)
  894 + def columns(table_name)
895 895 # Limit, precision, and scale are all handled by the superclass.
896 896 column_definitions(table_name).collect do |column_name, type, default, notnull|
897 897 PostgreSQLColumn.new(column_name, default, type, notnull == 'f')
2  activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -324,7 +324,7 @@ def table_exists?(name)
324 324 end
325 325
326 326 # Returns an array of +SQLiteColumn+ objects for the table specified by +table_name+.
327   - def columns(table_name, name = nil) #:nodoc:
  327 + def columns(table_name) #:nodoc:
328 328 table_structure(table_name).map do |field|
329 329 case field["dflt_value"]
330 330 when /^null$/i
4 activerecord/lib/active_record/reflection.rb
@@ -229,8 +229,8 @@ def counter_cache_column
229 229 end
230 230 end
231 231
232   - def columns(tbl_name, log_msg)
233   - @columns ||= klass.connection.columns(tbl_name, log_msg)
  232 + def columns(tbl_name)
  233 + @columns ||= klass.connection.columns(tbl_name)
234 234 end
235 235
236 236 def reset_column_information
2  activerecord/test/active_record/connection_adapters/fake_adapter.rb
@@ -33,7 +33,7 @@ def merge_column(table_name, name, sql_type = nil, options = {})
33 33 options[:null])
34 34 end
35 35
36   - def columns(table_name, message)
  36 + def columns(table_name)
37 37 @columns[table_name]
38 38 end
39 39 end

0 comments on commit dcd74eb

Please sign in to comment.
Something went wrong with that request. Please try again.