diff --git a/hobo/lib/generators/hobo/user_controller/templates/controller.rb.erb b/hobo/lib/generators/hobo/user_controller/templates/controller.rb.erb index b7e34ae09..47891bcf4 100644 --- a/hobo/lib/generators/hobo/user_controller/templates/controller.rb.erb +++ b/hobo/lib/generators/hobo/user_controller/templates/controller.rb.erb @@ -17,7 +17,10 @@ class <%= class_name %>Controller < ApplicationController def do_accept_invitation do_transition_action :accept_invitation do - flash[:notice] = t("hobo.messages.you_signed_up", :default=>"You have signed up") if this.valid? + if this.valid? + self.current_user = this + flash[:notice] = t("hobo.messages.you_signed_up", :default=>"You have signed up") + end end end <% end -%>