Mercurial > hg > soundsoftware-site
view .svn/pristine/b6/b6683def4ff299aa9cca77fe57bb77ce73743047.svn-base @ 1625:808a40a7cac7 live
Have a go at fixing #570 Can't delete downloadable file from version in project with no issue tracker
author | Chris Cannam |
---|---|
date | Thu, 07 Feb 2019 13:48:00 +0000 |
parents | cbb26bc654de |
children |
line wrap: on
line source
module PrependEngineViews def self.included(base) base.send(:include, InstanceMethods) base.class_eval do alias_method_chain :add_engine_view_paths, :prepend end end module InstanceMethods # Patch Rails so engine's views are prepended to the view_path, # thereby letting plugins override application views def add_engine_view_paths_with_prepend paths = ActionView::PathSet.new(engines.collect(&:view_path)) ActionController::Base.view_paths.unshift(*paths) ActionMailer::Base.view_paths.unshift(*paths) if configuration.frameworks.include?(:action_mailer) end end end Rails::Plugin::Loader.send :include, PrependEngineViews