Skip to content
Browse files

Make valid_type? public

  • Loading branch information...
1 parent 1fd7830 commit 5d528f835e871f5f9d4b68e8a81cfbe900b7e718 @rubys rubys committed Feb 14, 2013
View
8 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -305,6 +305,10 @@ def close
pool.checkin self
end
+ def valid_type?(type)
+ true
+ end
+
protected
def log(sql, name = "SQL", binds = [])
@@ -326,10 +330,6 @@ def translate_exception(exception, message)
# override in derived class
ActiveRecord::StatementInvalid.new(message)
end
-
- def valid_types?(type)
- true
- end
end
end
end
View
8 activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -582,6 +582,10 @@ def strict_mode?
@config.fetch(:strict, true)
end
+ def valid_type?(type)
+ !native_database_types[type].nil?
+ end
+
protected
# MySQL is too stupid to create a temporary table for use subquery, so we have
@@ -747,10 +751,6 @@ def configure_connection
# ...and send them all in one query
execute("SET #{encoding} #{variable_assignments}", :skip_logging)
end
-
- def valid_type?(type)
- !native_database_types[type].nil?
- end
end
end
end
View
8 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -655,6 +655,10 @@ def use_insert_returning?
@use_insert_returning
end
+ def valid_type?(type)
+ !native_database_types[type].nil?
+ end
+
protected
# Returns the version of the connected PostgreSQL server.
@@ -887,10 +891,6 @@ def extract_table_ref_from_insert_sql(sql)
def table_definition
TableDefinition.new(self)
end
-
- def valid_type?(type)
- !native_database_types[type].nil?
- end
end
end
end
View
5 activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -602,11 +602,6 @@ def translate_exception(exception, message)
super
end
end
-
- def valid_type?(type)
- true
- end
-
end
end
end

0 comments on commit 5d528f8

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