Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensuring search path for schema

  • Loading branch information...
commit c49deb7d47752479cc841eb766a76fdb40915d4f 1 parent b94e574
@dceballos dceballos authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/roomer/schema.rb
View
5 lib/roomer/schema.rb
@@ -33,8 +33,9 @@ def self.dump(scope=:tenanted)
end
FileUtils.mkdir_p(Roomer.schemas_directory) unless File.exists?(Roomer.schemas_directory)
filepath = File.expand_path(File.join(Roomer.schemas_directory, filename))
- ActiveRecord::Base.connection.schema_search_path = schema_name
- Roomer::SchemaDumper.dump(ActiveRecord::Base.connection, File.new(filepath, "w"))
+ ensuring_schema_and_search_path(schema_name) do
+ Roomer::SchemaDumper.dump(ActiveRecord::Base.connection, File.new(filepath, "w"))
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.