1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Ensure that ActionMailer::Base is there and not just the parent module

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8299 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-12-05 18:16:04 +00:00
parent edf32cea3f
commit cc0c4202be

View file

@ -276,7 +276,7 @@ module ActionView #:nodoc:
# it's relative to the view_paths array, otherwise it's absolute. The hash in <tt>local_assigns</tt>
# is made available as local variables.
def render_file(template_path, use_full_path = true, local_assigns = {}) #:nodoc:
if defined?(ActionMailer) && controller.is_a?(ActionMailer::Base) && !template_path.include?("/")
if defined?(ActionMailer) && defined?(ActionMailer::Base) && controller.is_a?(ActionMailer::Base) && !template_path.include?("/")
raise ActionViewError, <<-END_ERROR
Due to changes in ActionMailer, you need to provide the mailer_name along with the template name.