Mordernize code base with __dir__ and require_relative

This commit is contained in:
Jean Boussier
2015-05-13 15:33:00 -04:00
parent 9e815ec594
commit b31df0fb3d
11 changed files with 24 additions and 26 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ module Database
# to liquid as assigns. All this is based on Shopify
def self.tables
@tables ||= begin
db = YAML.load_file(File.dirname(__FILE__) + '/vision.database.yml')
db = YAML.load_file("#{__dir__}/vision.database.yml")
# From vision source
db['products'].each do |product|