lib/hyper-operation/transport/connection.rb in hyper-operation-0.5.11 vs lib/hyper-operation/transport/connection.rb in hyper-operation-0.5.12
- old
+ new
@@ -1,9 +1,10 @@
module Hyperloop
module AutoCreate
def needs_init?
return false if Hyperloop.transport == :none
- return true unless connection.tables.include?(table_name)
+ return true if connection.respond_to?(:data_sources) && !connection.data_sources.include?(table_name)
+ return true if !connection.respond_to?(:data_sources) && !connection.tables.include?(table_name)
return false unless Hyperloop.on_server?
return true if defined?(Rails::Server)
return true unless Connection.root_path
uri = URI("#{Connection.root_path}server_up")
http = Net::HTTP.new(uri.host, uri.port)