On Sat, Feb 16, 2013 at 9:34 AM, Peter Pavlovich <[email protected]> wrote:
> Hi Bryan,
>
> 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.

The do block in the transition is executed in the *middle* of
do_transition_action

If you don't render or redirect in the block on any hobo action, the
default action is performed.  For a transition action, the default
action is update_response; which changes the flash message to what you
see, and redirects to the model being updated.

To prevent the default action from being performed, simply add a
redirect or render in the block, which you have done.

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