Quick follow-up: Yes, this workaround does break all the existing chris#
routes so I would love to hear how to declare the lifecycle routes manually.

On Wed, May 26, 2010 at 4:24 PM, Chris Apolzon <[email protected]> wrote:

> As it turns out, if you try to define some custom routes for a model
> with a lifecycle:
>
>  map.resources :manuscripts, :collection => { :chris1 => :get,
>                                                :chris2 => :get,
>                                                :chris3 => :get,
>                                                :chris4 => :get,
>                                                :chris5 => :get
>                                            }
>
>  lifecycle do
>    state :assigned, :reviewing, :completed
>    create :assign, :become => :assigned, :available_to =>
> "User", :user_becomes => :editor
>    transition :review, { :assigned => :reviewing }, :available_to =>
> "User"
>    transition :complete, { :reviewing => :completed }, :available_to
> => "User"
>  end
>
> it greatly confuses the routing mechanism.  I declared my custom
> resources before Hobo.add_routes (which I'm nearly positive I read as
> the correct way to do custom routes in hobo), which results in
> "assign" (the create lifecycle action) being interpreted as an index
> and rails attempts to load the show action.  If you declare your
> custom resources AFTER Hobo.add_routes, the lifecycle stuff works
> fine....I haven't gotten a chance to investigate if this will cause my
> custom routes to break.
>
> I'm just wondering if this is a bug, or if there's a way to map the
> lifecycle routes by hand when adding custom routes.  Would they
> be :member declarations?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>
>

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

Reply via email to