Hi Bryan,

The fix you posted corrected the major issue. An invited user can now 
"accept" their invitation! Thank you for that fix!

There still seems to be a secondary issue, although it may just be an 
incorrect expectation on my part. In the code that is generated for the 
User Controller, I see the following:

  def do_accept_invitation
    do_transition_action :accept_invitation do
      if this.valid?
        self.current_user = this
        flash[:notice] = t("hobo.messages.you_signed_up", :default=>"You 
have signed up")
      end
    end
  end


This leads me to expect to see the flash message "You have signed up" 
displayed to the user after they successfully enter their new password and 
password confirmation. Instead, the user is shown the flash message 
"Changes to the user have been saved" (or something similar). Also, at this 
point (after completing the sign-up process), the user is left sitting at 
the "view" screen for their now updated user object. I would think they 
should have been redirected to the "home" page.

I don't see any code to redirect them so I suppose that should become a 
feature request. However, I am puzzled as to why the flash message "You 
have signed up" was not displayed? I suspect that the currently displayed 
flash message and redirection to the user show page is the result of saving 
the user after updating the password and status. But, I though that the 
"do" block of the transition, 

      do
         if this.valid?
           self.current_user = this
           flash[:notice] = t("hobo.messages.you_signed_up", :default=>"You 
have signed up")
          end
        end

would be executed AFTER the "do_transition_action :accept_invitation" part. 
Am I mistaken here? I guess I am asking this to improve my own 
understanding of how transitions work. 

If I were to want to redirect to the home page after successfully accepting 
the invitation, would I simply add a "redirect_to home_page" call as in:


  def do_accept_invitation
    do_transition_action :accept_invitation do
      if this.valid?
        self.current_user = this
        flash[:notice] = t("hobo.messages.you_signed_up", :default=>"You 
have signed up")

                  redirect_to home_page 

      end
    end
  end  


Thanks again for the fix! That at least unblocks me from being able to move 
forward!

Regards,

Peter

On Friday, February 15, 2013 8:15:58 PM UTC-5, Bryan Larsen wrote:
>
> Peter, I pushed a fix to Github.   Please try it out. 
>
> thanks, 
> Bryan 
>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to