Permalink
Browse files

Fixed activation bug where recently_activated? method call was not pr…

…operly left out when there was no stateful options present at generate time.
  • Loading branch information...
1 parent b72239b commit fc5486d7c137c0ce7c2be71f1425f2110c646592 azabaj committed with Jun 19, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 generators/authenticated/templates/observer.rb
@@ -5,7 +5,7 @@ def after_create(<%= file_name %>)
def after_save(<%= file_name %>)
<% if options[:include_activation] %>
- <%= class_name %>Mailer.deliver_activation(<%= file_name %>) if <%= file_name %>.recently_activated?
+ <%= class_name %>Mailer.deliver_activation(<%= file_name %>) if <% if options[:aasm] || options[:stateful] %> <%= file_name %>.recently_activated <% else %><%= file_name %>.activated_at<% end %>
<% end %>
end
end

2 comments on commit fc5486d

i think there's a bug here on line 8. we're missing the question mark at the end of the method name "recently_activated?". it was there in the prev revision so i'm assuming the bug is here and not in the generator for the model

Owner

technoweenie replied Oct 1, 2010

Agreed

Please sign in to comment.