On Jueves, 9 de Septiembre de 2010 10:31:05 Shanbo Li escribió:
> Hello Sergio,
>
> Thanks a lot for your reply.
>
> Do you know if I want to hack the plugin where should I change to add
> these routes?

You can look at how is done in active_scaffold_sortable.
Anyway, add them to init.rb or in a new file and require it in init.rb

The lines must be like this one:
ActionController::Resources::Resource::ACTIVE_SCAFFOLD_ROUTING[:collection]
[:action] = :method

>
> Thanks,
> BR,
> Shanbo
>
> On Thu, Sep 9, 2010 at 4:21 PM, Sergio Cambra .:: entreCables S.L. ::.
>
> <[email protected]> wrote:
> > On Jueves, 9 de Septiembre de 2010 03:25:12 Shanbo escribió:
> >> Hi there,
> >>
> >> When I use active_scaffold -r rails-2.3 with latest version of
> >> active_scaffold_config_list, there is always exceptions at server
> >> side.
> >>
> >> Processing CandidatesController#show (for 127.0.0.1 at 2010-09-09
> >> 00:07:56) [GET]
> >> Parameters: {"action"=>"show", "method"=>"get",
> >> "adapter"=>"list_inline_adapter", "id"=>"prepare_config_list",
> >> "controller"=>"candidates"} Candidate Load (1.0ms) SELECT * FROM
> >> candidates WHERE (candidates.id = 0)
> >>
> >> ActiveRecord::RecordNotFound (Couldn't find Candidate with
> >> ID=prepare_config_list):
> >> -e:1:in `load' -e:1
> >>
> >> It looks like something wrong with the routing. the ID should not be
> >> "prepare_config_list"
> >> and my routing is:
> >> map.resources :candidates, :active_scaffold => true
> >>
> >> Have you seen the problem before or you know how to fix this without
> >> effect normal function of AS.
> >
> > Probably active_scaffold_config_list doesn't add their routes to
> > ACTIVE_SCAFFOLD_ROUTING, so :active_scaffold => true doesn't add routes
> > for active_scaffold_config_list actions. You will have to add some routes
> > with
> >
> > :collection and :member options.
> >
> > map.resources :candidates, :active_scaffold => true, :collection =>
> > {:prepare_config_list => :get}
> > Maybe there are more routes missing, I don't know that plugin
> >
> > --
> > 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]. For
> > more options, visit this group at
> > http://groups.google.com/group/activescaffold?hl=en.

-- 
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].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to