awesome, thanks for this.... I actually had the EXACT same issue and
had been banging my head against the wall for days. i was about to
On Nov 23, 8:57 am, Ryan Daigle <
ryan.dai...@gmail.com> wrote:
> What I'm settling on for the time being, and it seems to be going ok so far, is to wrap my devise_for within a scope that mimics being a nested resource:
>
> resources :businesses
> scope "businesses/:business_id" do
> devise_for :users
> end
>
> Then all I have to do is update the sessions/_form partial to include the business_id from params into the form as a hidden field. All the other route helpers etc... seem to be working with this setup, properly including the business_id when necessary to build a path.
>
> I'll update this if there are any more tricks or updates needed to get this type of solution working.
>
> Are there any plans to make Devise more resource-aware? Right now it feels a little bit like a bad citizen in the routing world since it doesn't play well with others. Just a thought.
>
> -Ryan
>
> On Nov 22, 2010, at 5:39 PM, Carlos Antonio da Silva wrote:
>
>
>
>
>
>
>
> > Devise controllers won't know about your nested resource, which means it won't know how to filter the user based on the current business coming from the url, you'd have to do this manually.
>
> > Now about the routes, I really don't get how they're being generated this way.
> > If you can provide an app showing your issue, would help.
>