mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make more Template methods public to make ActionMailer tests pass
This commit is contained in:
parent
256b0ee8e3
commit
b49027e188
2 changed files with 9 additions and 9 deletions
|
@ -474,7 +474,7 @@ module ActionMailer #: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?
|
||||
|
|
|
@ -95,13 +95,6 @@ module ActionView #:nodoc:
|
|||
end
|
||||
memoize :mime_type
|
||||
|
||||
private
|
||||
|
||||
def format_and_extension
|
||||
(extensions = [format, extension].compact.join(".")).blank? ? nil : extensions
|
||||
end
|
||||
memoize :format_and_extension
|
||||
|
||||
def multipart?
|
||||
format && format.include?('.')
|
||||
end
|
||||
|
@ -110,6 +103,13 @@ module ActionView #:nodoc:
|
|||
format.gsub('.', '/')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def format_and_extension
|
||||
(extensions = [format, extension].compact.join(".")).blank? ? nil : extensions
|
||||
end
|
||||
memoize :format_and_extension
|
||||
|
||||
def mtime
|
||||
File.mtime(filename)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue