Skip to content

Loading…

Make valid_type? public #9283

Merged
merged 1 commit into from

2 participants

@carlosantoniodasilva carlosantoniodasilva merged commit 9aa96f7 into rails:master
@carlosantoniodasilva
Ruby on Rails member

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 14, 2013
  1. @rubys

    Make valid_type? public

    rubys committed
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
Something went wrong with that request. Please try again.