Module: Adva::Engine::InstanceMethods

Defined in:
lib/adva/engine.rb

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



35
36
37
38
39
40
41
42
# File 'lib/adva/engine.rb', line 35

def copy_migrations
  Dir[root.join('db/migrate/*')].map do |source|
    target = File.expand_path(source.gsub(root.to_s, '.'))
    FileUtils.mkdir_p(File.dirname(target))
    FileUtils.cp(source, target)
    target
  end
end

#load_redirectsObject



28
29
30
31
32
33
# File 'lib/adva/engine.rb', line 28

def load_redirects
  begin
    load root.join('config/redirects.rb')
  rescue LoadError
  end
end

#require_patchesObject



24
25
26
# File 'lib/adva/engine.rb', line 24

def require_patches
  Dir[root.join('lib/patches/**/*.rb')].each { |patch| require patch }
end