Skip to content

Commit

Permalink
Merge pull request rails#28176 from kamipo/push_valid_type_up_to_abst…
Browse files Browse the repository at this point in the history
…ract_adapter

Push `valid_type?` up to abstract adapter
  • Loading branch information
pixeltrix committed Feb 26, 2017
2 parents 38d05ce + b254886 commit 228c6c0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def arel_visitor # :nodoc:
Arel::Visitors::ToSql.new(self)
end

def valid_type?(type)
false
def valid_type?(type) # :nodoc:
!native_database_types[type].nil?
end

def schema_creation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,6 @@ def strict_mode?
self.class.type_cast_config_to_boolean(@config.fetch(:strict, true))
end

def valid_type?(type)
!native_database_types[type].nil?
end

def default_index_type?(index) # :nodoc:
index.using == :btree || super
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,6 @@ def use_insert_returning?
@use_insert_returning
end

def valid_type?(type)
!native_database_types[type].nil?
end

def update_table_definition(table_name, base) #:nodoc:
PostgreSQL::Table.new(table_name, base)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def supports_index_sort_order?
true
end

def valid_type?(type)
def valid_type?(type) # :nodoc:
true
end

Expand Down

0 comments on commit 228c6c0

Please sign in to comment.