Sha256: 39ffe1b6d83805f9f9d57314176327bb20ca42ead603c83c06f2d3f1b026192b

Contents?: true

Size: 752 Bytes

Versions: 1

Compression:

Stored size: 752 Bytes

Contents

module ActionMailer #:nodoc
  class Base #:nodoc:
    private
      def template_path_with_plugin_routing
        template_paths = [template_path_without_plugin_routing]
        Desert::Manager.plugins.reverse.each do |plugin|
          template_paths << "#{plugin.templates_path}/#{mailer_name}"
        end
        "{#{template_paths * ','}}"
      end
      alias_method_chain :template_path, :plugin_routing

      def initialize_template_class(assigns)
        view_path = File.dirname(Dir["#{template_path}/#{@template}.*"].first)
        returning(template = ActionView::Base.new([view_path], assigns, self)) do
          template.extend ApplicationHelper
          template.extend self.class.master_helper_module
        end
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
desert-0.3.0 lib/desert/plugin_templates/1.99.0/action_mailer.rb