lib/globalize/rails/action_mailer.rb
# Initialize the mailer via the given +method_name+. The body will be
# rendered and a new TMail::Mail object created.
#
# This method is overriden by Globalize to support multiple templates
# for different locales. For example, use:
#   signup_notification.en-US.text.html.rhtml
# It is fully backwards compatible with the original rails version.

Initialize the mailer via the given +method_name+. The body will be
rendered and a new TMail::Mail object created.

This method is overriden by Globalize to support multiple templates
for different locales. For example, use:
signup_notification.en-US.text.html.rhtml
It is fully backwards compatible with the original rails version.
Initialize the mailer via the given + method_name + . The body will be rendered and a new TMail :: Mail object created . This method is overriden by Globalize to support multiple templates for different locales . For example use : signup_notification . en - US . text . html . rhtml It is fully backwards compatible with the original rails version .
def render_localized_normal_template
        template_exists = @parts.empty?
        locale_codes.each do |code|
          localized_name = @template
          if !template_exists
            if code 
              localized_name = [ @template, code ].join(".")
              template_exists ||= 
                Dir.glob("#{template_path}/#{localized_name}.*").any? { |i| i.split(".").length == 3 }
            else
              template_exists ||= 
                Dir.glob("#{template_path}/#{@template}.*").any? { |i| i.split(".").length == 2 }
            end
          end
          @body = render_message(localized_name, @body) if template_exists
          break if template_exists
        end
      end
def render_localized_normal_template template_exists = @parts . empty? locale_codes . each do | code | localized_name = @template if ! template_exists if code localized_name = [ @template , code ] . join ( "." ) template_exists ||= Dir . glob ( "#{template_path}/#{localized_name}.*" ) . any? { | i | i . split ( "." ) . length == 3 } else template_exists ||= Dir . glob ( "#{template_path}/#{@template}.*" ) . any? { | i | i . split ( "." ) . length == 2 } end end @body = render_message ( localized_name , @body ) if template_exists break if template_exists end end
Initialize the mailer via the given +method_name+.
Initialize the mailer via the given + method_name + .