Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make more Template methods public to make ActionMailer tests pass

  • Loading branch information...
commit b49027e188466e55179f737906590a5feb8fea95 1 parent 256b0ee
@wycats wycats authored
View
2  actionmailer/lib/action_mailer/base.rb
@@ -474,7 +474,7 @@ def create!(method_name, *parameters) #:nodoc:
# have not already been specified manually.
if @parts.empty?
Dir.glob("#{template_path}/#{@template}.*").each do |path|
- template = template_root.find_template("#{mailer_name}/#{File.basename(path)}")
+ template = template_root.find_by_parts("#{mailer_name}/#{File.basename(path)}")
# Skip unless template has a multipart format
next unless template && template.multipart?
View
16 actionpack/lib/action_view/template/template.rb
@@ -95,6 +95,14 @@ def mime_type
end
memoize :mime_type
+ def multipart?
+ format && format.include?('.')
+ end
+
+ def content_type
+ format.gsub('.', '/')
+ end
+
private
def format_and_extension
@@ -102,14 +110,6 @@ def format_and_extension
end
memoize :format_and_extension
- def multipart?
- format && format.include?('.')
- end
-
- def content_type
- format.gsub('.', '/')
- end
-
def mtime
File.mtime(filename)
end
Please sign in to comment.
Something went wrong with that request. Please try again.