# Map.resources, restricting to only /index and /show

**URL:** <https://www.ruby-forum.com/t/map-resources-restricting-to-only-index-and-show/93113>\
**Category:** Rails\
**Created:** [April 27, 2007, 6:29pm UTC](https://www.ruby-forum.com/t/map-resources-restricting-to-only-index-and-show/93113 "2007-04-27T18:29:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [April 27, 2007, 6:29pm UTC](https://www.ruby-forum.com/t/map-resources-restricting-to-only-index-and-show/93113/1 "2007-04-27T18:29:38Z")

</div>

Is there a way to restrict the routes that get generated by  
map.resources to  
only /index and /show? On the frontend have no need for edit and  
delete.

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [April 27, 2007, 7:42pm UTC](https://www.ruby-forum.com/t/map-resources-restricting-to-only-index-and-show/93113/2 "2007-04-27T19:42:44Z")

</div>

> Is there a way to restrict the routes that get generated by map.resources to  
> only /index and /show? On the frontend have no need for edit and delete.

That’s done automatically. Just don’t implement edit and destroy  
actions on the corresponding controller. People will get a 406 Not  
Supported reply if they try.
