##// END OF EJS Templates
Merged r6401 from trunk....
Merged r6401 from trunk. PDF: remove unused DejaVuSans-ExtraLight font. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@6407 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2773:7b0cb6aba871
r6287:37d7a9d62d0c
Show More
init.rb
21 lines | 687 B | text/x-ruby | RubyLexer
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