Any ideas how to get relation instead of scopes? 2010/7/26 Andrey Voronkov <[email protected]>
> How should this look like? > Just has_many :children or has_many :something? > > > 2010/7/26 [email protected] <[email protected]> > > Hi, >> >> children is a named scope in ancestry. AS Nesting requires an >> association. I would suggest to create a children2 association in your >> model, which you may use in your nested.add_link call. >> >> -- >> Volker >> >> On Jul 26, 5:59 am, Andrey Voronkov <[email protected]> wrote: >> > I'm trying to make work together >> > Ancestry<http://github.com/stefankroes/ancestry> and >> > ActiveScaffold on Nesting. Getting this: >> > ActionView::TemplateError (undefined method `association' for >> nil:NilClass) >> > on line #13 of >> > vendor/plugins/active_scaffold/frontends/default/views/_nested.html.erb: >> > 10: associated_columns.each do | column_name | >> > 11: # find the column and the association >> > 12: column = active_scaffold_config.columns[column_name] >> > 13: association = column.association >> > 14: >> > 15: # determine what constraints we need >> > 16: @constraints = { association.reverse => parent_id } >> > >> > config.nested.add_link('subprograms', [:children]) >> > I do not know what to write in [] >> > >> > In my model: >> > ... >> > has_ancestry :cache_depth => true >> > ... >> > >> > Is it possible for ancestry architecture from one side (it has no >> parent_id >> > column, but method instead) and ActiveScaffold to work together? >> >> -- >> 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.
