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:
parent
eb457323ef
commit
835d02aedf
1
app/views/dmsf_mailer/send_documents.html.erb
Normal file
1
app/views/dmsf_mailer/send_documents.html.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%= ApplicationHelper.simple_format(@body) %>
|
||||||
1
app/views/dmsf_mailer/send_documents.text.erb
Normal file
1
app/views/dmsf_mailer/send_documents.text.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%= @body %>
|
||||||
29
config/initializers/action_mailer_extensions.rb
Normal file
29
config/initializers/action_mailer_extensions.rb
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user