Skip to content

Commit

Permalink
Fix for a change in action_mailer that dislikes .html.erb on the (non…
Browse files Browse the repository at this point in the history
…-html) email template:

  In rails 2.2, the activation email on account creation seems not to use the template, but instead is just the available variables crammed together. the attachment is an rspec test which I placed under spec/controllers. it passes in rails 2.1, fails in rails 2.2.

see
* http://rails_security.lighthouseapp.com/projects/15332/tickets/3-activation-email-template-broken-in-edgerails#ticket-3-4
* http://github.com/rails/rails/commit/b2504f8ba0f9baadb9298647fd58ef2c136f9aae

Thanks to Lewis Hoffman for the findin' and the fixin'
  • Loading branch information
Philip (flip) Kromer committed Aug 14, 2008
1 parent 844c005 commit d73fbe6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions generators/authenticated/authenticated_generator.rb
Expand Up @@ -68,8 +68,8 @@ def initialize(runtime_args, runtime_options = {})
@model_controller_controller_name = @model_controller_plural_name

load_or_initialize_site_keys()
if options[:dump_generator_attribute_names]

if options[:dump_generator_attribute_names]
dump_generator_attribute_names
end
end
Expand Down Expand Up @@ -233,8 +233,8 @@ def manifest
if options[:include_activation]
# Mailer templates
%w( activation signup_notification ).each do |action|
m.template "#{action}.html.erb",
File.join('app/views', "#{file_name}_mailer", "#{action}.html.erb")
m.template "#{action}.erb",
File.join('app/views', "#{file_name}_mailer", "#{action}.erb")
end
end

Expand Down Expand Up @@ -270,8 +270,8 @@ def manifest
end
if options[:aasm]
puts "- Install the acts_as_state_machine gem:"
puts " sudo gem sources -a http://gems.github.com (If you haven't already)"
puts " sudo gem install rubyist-aasm"
puts " sudo gem sources -a http://gems.github.com (If you haven't already)"
puts " sudo gem install rubyist-aasm"
elsif options[:stateful]
puts "- Install the acts_as_state_machine plugin:"
puts " svn export http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk vendor/plugins/acts_as_state_machine"
Expand Down Expand Up @@ -391,7 +391,7 @@ def add_options!(opt)
opt.on("--stateful",
"Use acts_as_state_machine. Assumes --include-activation") { |v| options[:include_activation] = options[:stateful] = true }
opt.on("--aasm",
"Use (gem) aasm. Assumes --include-activation") { |v| options[:include_activation] = options[:stateful] = options[:aasm] = true }
"Use (gem) aasm. Assumes --include-activation") { |v| options[:include_activation] = options[:stateful] = options[:aasm] = true }
opt.on("--rspec",
"Force rspec mode (checks for RAILS_ROOT/spec by default)") { |v| options[:rspec] = true }
opt.on("--no-rspec",
Expand Down

0 comments on commit d73fbe6

Please sign in to comment.