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 2d24dae commit 21f8cbd6df8b1ac3c5055173a34d8a593c657668 azabaj committed 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

0 comments on commit 21f8cbd

Please sign in to comment.