Additional controller updates; patched mailer for Rails 3; included override for ActionMailer so we can add path for plugin to view paths

This commit is contained in:
Daniel Munn 2012-06-03 18:00:14 +01:00
parent eb457323ef
commit 835d02aedf
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1 @@
<%= ApplicationHelper.simple_format(@body) %>

View File

@ -0,0 +1 @@
<%= @body %>

View File

@ -0,0 +1,29 @@
module ActionMailer
class Base
class_inheritable_accessor :view_paths
def self.prepend_view_path(path)
view_paths.unshift(*path)
ActionView::TemplateFinder.process_view_paths(path)
end
def self.append_view_path(path)
view_paths.push(*path)
ActionView::TemplateFinder.process_view_paths(path)
end
private
def self.view_paths
@@view_paths ||= [template_root]
end
def view_paths
self.class.view_paths
end
def initialize_template_class(assigns)
ActionView::Base.new(view_paths, assigns, self)
end
end
end