As mentioned in the previous post, the routes.rb file is processed 
top-down.

So you need to change that line to

map.resources :orders, :collection => { :inprocess_orders => :get, 
:unprocessed_orders> => :get }

Delete the other 2 lines i.e ..
    map.resources :orders, :collection => { :unprocessed_orders => :get 
}
    map.resources :orders


SachinJ wrote:
> On the same thread i have another query, I have different types of
> order listings for which I have a different query.
> All the queries are separate methods thus have separate views which
> renders the same list partial.
> 
> As experts suggested I create following routes.
> 
> map.resources :orders, :collection => { :inprocess_orders => :get }
> map.resources :orders, :collection => { :unprocessed_orders
> => :get }
> map.resources :orders
> 
> It worked fine for the inprocess_orders but the unprocessed_orders
> again looks for a id with name 'unprocessed_orders'
> 
> I am sure there is a minor correction i need to do, but not able to
> make it working .
> Any help appreciated.
> 
> Best,
> Sachin

-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to