# Customizing REST calls

**URL:** <https://www.ruby-forum.com/t/customizing-rest-calls/128015>\
**Category:** Rails\
**Created:** [February 4, 2008, 9:17am UTC](https://www.ruby-forum.com/t/customizing-rest-calls/128015 "2008-02-04T09:17:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohsinHijazee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Post date:** [February 4, 2008, 9:17am UTC](https://www.ruby-forum.com/t/customizing-rest-calls/128015/1 "2008-02-04T09:17:28Z")

</div>

Hi!  
Can we customize a map.resources call so that it calls different  
methods based on the HTTP verb called?

Like:

map.resources :posts, :controller =\> ‘admin/blogs’

Would call the

Admin::Blogs#index() on GET  
Admin::Blogs#create on POST  
Admin::Blogs#update() on PUT  
Admin::Blogs#destroy() on DELETE

But I want that on GET method, instead of calling the  
Admin::Blogs#index() method, it should call the  
Admin::Blogs#list\_posts method. How can I customize that? I know that  
i can user the :member and :collection modifiers that can provide  
additional operations on resources but that’s not the way to go.

Regards,  
Mohsin
