File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,8 @@ def execute_and_auto_confirm(sql, name = nil)
9191
9292 # disable all schemas browsing when default schema is specified
9393 def table_exists? ( name )
94- schema ?
95- @connection . table_exists? ( name , schema ) :
96- @connection . table_exists? ( name )
94+ return false unless name
95+ schema ? @connection . table_exists? ( name , schema ) : @connection . table_exists? ( name )
9796 end
9897
9998 DRIVER_NAME = 'com.ibm.as400.access.AS400JDBCDriver' . freeze
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ def test_tables
195195 def test_table_exists?
196196 assert_true ActiveRecord ::Base . connection . table_exists? 'entries'
197197 assert_false ActiveRecord ::Base . connection . table_exists? 'blahbls'
198+ assert ! ActiveRecord ::Base . connection . table_exists? ( nil )
198199 end
199200
200201 def test_entries_empty
You can’t perform that action at this time.
0 commit comments