localization_generator 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/templates/localization.rb +12 -1
  2. metadata +1 -1
@@ -71,5 +71,16 @@ module <%= class_name %>
71
71
  l(@symbol, @arguments)
72
72
  end
73
73
  end
74
-
74
+
75
+ # redefinition of ActionMail::Base#render_body, that adds locale suffix to
76
+ # the template name
77
+ ActionMailer::Base.module_eval <<-EOL
78
+ class << self
79
+ private
80
+ alias :render_body_old :render_body
81
+ def render_body(mailer, method_name)
82
+ ActionView::Base.new(template_path, mailer.body).render_file(method_name + "_#{CONFIG[:default_language]}")
83
+ end
84
+ end
85
+ EOL
75
86
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: localization_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.2
6
+ version: 1.0.3
7
7
  date: 2005-04-19
8
8
  summary: "[Rails] Localization generator."
9
9
  require_paths: