Hi Jonathan,

Yes, I would bet there is a better way to accomplish this. :-)

However, that might depend on your specific application.

eg: If your models have associations defined then you should be able
to do a conf.nested.add_link :restaurants in your franchise
active_scaffold_config.

--
Volker

On Jan 12, 9:02 am, "[email protected]"
<[email protected]> wrote:
> Sure - its a site for a restaurant services company with franchises.
> Every franchise has restaurants, customers, expenses, etc.  So, the
> route above creates a table view of each of the restaurants or
> customers or expenses in each franchise.  Each element on the table
> columns has its own action links.
>
> btw, I did not write initial code - so there may be a better way to
> accomplish this now.  In particular I'm wondering if there is a way to
> do this with faster page loads.
>
> Jonathan
>
> On Jan 11, 11:11 pm, vhochstein <[email protected]> wrote:
>
> > Hi Jonathan,
>
> > just to satisfy my curiosity. Why do you need to define that route?
>
> > --
> > Volker
>
> > On Jan 12, 2:36 am, "[email protected]"
>
> > <[email protected]> wrote:
> > > Volker, thanks, this was very helpful.  I had to change:
>
> > > "#{controller}/nested/#{id}?associations=#{association}"
>
> > > to
>
> > > "#{association}?assoc_id=#{id}&association=#{association}
> > > &eid=#{controller}_#{franchise_id}_#{association}
> > > &parent_model=#{controller_name_singular}"
>
> > > btw, is this documented anywhere?
>
> > > Jonathan
>
> > > On Jan 11, 4:22 am, vhochstein <[email protected]> wrote:
>
> > > > Hi Jonathan,
>
> > > > nested action is gone. instead it s just an index action now.
> > > > eg:
> > > > GET "/players2?
> > > > assoc_id=2&association=players&eid=teams_2_players&parent_model=team&adapte
> > > >  r=_list_inline_adapter
>
> > > > index action is part of default rails routing and you do not need to
> > > > specify specific routes.
>
> > > > --
> > > > Volker
>
> > > > On Jan 11, 11:30 am, "[email protected]"
>
> > > > <[email protected]> wrote:
> > > > > I upgraded an existing rails 2.2.2/ruby1.8/active scaffold project to
> > > > > rails 3.0.3/ruby1.9.1.
>
> > > > > I have been able to get several active scaffolds to work properly,
> > > > > however I have some scaffolds that were at the url / route:
>
> > > > >http://localhost/{controller}/nested/{id}?associations={association}
>
> > > > > Now, when I try to go to this url, I get the message:
>
> > > > > "Unknown action
>
> > > > > The action 'nested' could not be found for {controller}"
>
> > > > > I have tried many different combinations of routing, and traced the
> > > > > code, but I can not determine why the nested active scaffold does not
> > > > > render like it did before the upgrade.
>
> > > > > Jonathan
>
> > > > > On Jan 10, 11:50 pm, vhochstein <[email protected]> wrote:
>
> > > > > > Hi Jonathan,
>
> > > > > > You do not have to configure any special routes to get nested
> > > > > > Activescaffolds up and running.
>
> > > > > > Can you please give some more details about the issue you are 
> > > > > > facing?
>
> > > > > > --
> > > > > > Volker
>
> > > > > > On Jan 10, 8:36 am, "[email protected]"
>
> > > > > > <[email protected]> wrote:
> > > > > > > I have attempted using this syntax, but it does not appear to 
> > > > > > > work for
> > > > > > > a nested ActiveScaffold.
>
> > > > > > > Can someone kindly recommend how to define the routes of 
> > > > > > > controller
> > > > > > > with nested ActiveScaffolds using Rails 3 fork from vhochstein 
> > > > > > > branch?
>
> > > > > > > On Dec 4 2010, 12:42 pm, Jeff Surrett <[email protected]> wrote:
>
> > > > > > > > The new syntax would be:
>
> > > > > > > >   resources :location do
> > > > > > > >     as_routes
> > > > > > > >     # other routes for location
> > > > > > > >   end
>
> > > > > > > > On Dec 4, 12:59 am, MichaelLatta <[email protected]> wrote:
>
> > > > > > > > > I am using theRails3fork from vhochstein and trying to get 
> > > > > > > > > setup
> > > > > > > > > working.  I have used an older version of active scaffold 
> > > > > > > > > underRails
> > > > > > > > > 2.x.
>
> > > > > > > > > Using "resources :location, :activescaffold => true" does not 
> > > > > > > > > appear
> > > > > > > > > to generate the needed routes.  Are the required routes 
> > > > > > > > > needed to be
> > > > > > > > > added to the standard resource routes listed somewhere?  
> > > > > > > > > Should this
> > > > > > > > > generate the missing reoutes?

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