I think that "redirect_to" is only available in the controller. You may 
have to override the hobo_signup(&b) method in the UsersController class.

Here is the default implementation of this method:

    def hobo_signup(&b)
      if logged_in?
        redirect_back_or_default(home_page)
      else
        creator_page_action(:signup, &b)
      end
    end

You would probably want to add this method to the UsersController class:

    def hobo_signup(&b)
      if logged_in?
        redirect_back_or_default(home_page)
      else
        creator_page_action(:signup, &b)
        redirect_to "/events/new"
      end
    end

That seems like it might work for you. Perhaps Bryan or another group 
reader will have a better suggestion for your scenario though.

Regards,

Peter

On Saturday, February 16, 2013 6:07:42 PM UTC-5, tonym wrote:
>
> Hi All,
>
> maybe I'm doing something wrong here, but....
>
> I'm just trying to redirect to a certain page, after a user as signed up.
>
> I've tried adding redirect_to...
>
>     create :signup, :available_to => "Guest",
>       :become => :active  do
>         redirect_to "/events/new"
>     end
>
> This fails with: undefined method `redirect_to' for #<User:0x9b9c680>
>
> Same also occurs if I try 'redirect_to' in an after_create
>
> I've also tried adding 'after-submit' in the form and that does not seem 
> to register, although it is clearly in the submission.
>
> Any ideas?
>
> Cheers, Anthony.
>

-- 
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