On Friday 26 February 2010 10:15:38 Sergio Cambra .:: entreCables S.L. ::. 
wrote:
> > > > > config.column[:catalog_items].includes = nil
> > > >
> > > > With any combination of the model containing "has_many
> > > > :catalog_items" and the controller having a preceding line
> > > > "config.columns <<
> > > >
> > > > :catalog_items" that line causes an error:
> > > >
> > > > undefined method `column' for CatalogItemsController:Class
> > >
> > > You don't need to add catalog_items to config.columns, it's an
> > > association and it's added by default.
> >
> > Ok, but then what do I do? Setting
> > "config.column[:catalog_items].includes = nil" still gives the error
> > above.
> 
> Have you defined catalog_items association? That line, and association is
>  only needed for config.nested.add_link approach. If you use
>  config.action_links.add with similar action, you don't need that line
>  neither association.

I know. I tried the association approach with AND without that line, but it 
didn't work.

> You can set :position => :after for the action_link and record won't be
> replaced.

Hah, that did the trick!

I am amazed, both ActiveScaffolds customizability and your patience seem to be 
endless.

Thank you, Sergio!
Benjamin Adler

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