Has anyone gotten the same error?

By the way, thanks a lot for ActiveScaffold. It's a wonderful project
and has saved me a lot of time.

On Jun 7, 7:30 am, Andrés Mejía <[email protected]> wrote:
> Hi Sergio,
>
> I've already added :active_scaffold => true to my routes (see my gist at the
> bottom of my previous message).
>
> It looks like AS is dropping the namespace within the nested association. It
> should really be making a request to "admin/categories/new", but it's doing
> it to "categories/new" (without the admin prefix). That's what causes the
> exception.
>
> Any other idea? Thanks!
>
> Andrés
>
> On Mon, Jun 7, 2010 at 5:09 AM, Sergio Cambra .:: entreCables S.L. ::. <
>
> [email protected]> wrote:
> > On Sábado, 5 de Junio de 2010 22:06:33 Andrés Mejía escribió:
> > > Hi,
>
> > > I'm facing the following problem.
>
> > > I have a Product and a Category model. A Product
> > > has_and_belongs_to_many Categories and viceversa.
> > > I've set up an ActiveScaffold for each of them under an Admin
> > > namespace.
>
> > > Everything works perfectly, except for the association between them.
> > > When I'm on a Product's scaffold, I can see the Categories associated
> > > with it correctly. But when I try to add a new one, I get a routing
> > > error. Here a series of images to further clarify what I mean:
>
> > Add :active_scaffold => true to your routes.rb for each map.resources line
>
> > > Step 1. I can see the product's scaffold with the categories it is
> > > associated with, on localhost:3000/admin/products. I'll click the link
> > > to edit its category:
> > >http://img.skitch.com/20100605-mm8yiwsrb476e46f212if3irfy.png
>
> > > Step 2. A little box for the category appears. I'll click the link to
> > > add a new category:
> > >http://img.skitch.com/20100605-mbnynqr48a6d691wymf93fbe8a.png
>
> > > Step 3. An exception is raised!
> > >http://img.skitch.com/20100605-g9rfd1rwjt9f1qprsximc1qn36.png
>
> > > Looking at the log, the exception raised is the following:
>
> > > ActionController::RoutingError (No route matches "/categories/new"
> > > with {:method=>:get})
>
> > > This is indeed true, because I don't have any route for that. The
> > > problem is that it should really be calling "admin/categories/new".
>
> > > Here are the relevant parts of my code:
>
> > >http://gist.github.com/426955
>
> > > I'd really appreciate if someone could take the time to help me solve
> > > this.
>
> > > Thanks!
>
> > --
> > Sergio Cambra .:: entreCables S.L. ::.
> > Mariana Pineda 23, 50.018 Zaragoza
> > T) 902 021 404 F) 976 52 98 07 E) [email protected]
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ActiveScaffold : Ruby on Rails plugin" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<activescaffold%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/activescaffold?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.

Reply via email to