Module: Adva::Engine::InstanceMethods
- Defined in:
- lib/adva/engine.rb
Instance Method Summary collapse
Instance Method Details
#copy_migrations ⇒ Object
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.(source.gsub(root.to_s, '.')) FileUtils.mkdir_p(File.dirname(target)) FileUtils.cp(source, target) target end end |
#load_redirects ⇒ Object
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_patches ⇒ Object
24 25 26 |
# File 'lib/adva/engine.rb', line 24 def require_patches Dir[root.join('lib/patches/**/*.rb')].each { |patch| require patch } end |