# RESTful route for a form

**URL:** <https://www.ruby-forum.com/t/restful-route-for-a-form/188611>\
**Category:** Rails\
**Created:** [May 14, 2010, 6:42pm UTC](https://www.ruby-forum.com/t/restful-route-for-a-form/188611 "2010-05-14T18:42:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam\_wead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@adam\_wead](https://www.ruby-forum.com/u/adam_wead)\
**Post date:** [May 14, 2010, 6:42pm UTC](https://www.ruby-forum.com/t/restful-route-for-a-form/188611/1 "2010-05-14T18:42:21Z")

</div>

I’m trying to figure out what the route should be for a form I’m  
creating. I have 2 tables: rooms, teches. One room can have many  
teches (ie, computers), and I’ve created a form for moving a tech from  
one room to the other. I’ve setup a form that pulls a list of room  
names and their ids and creates a menu select where the user can  
select a room for the computer. When the form runs, it will update  
the tech with a new foreign key pointing to a different room.

I’ve created a new method in the tech controller called “move” and I’m  
confused about what the route should look like. First of all, is a  
route RESTful if it does not use a CRUD method? I’m assuming that my  
action in the route should be “move” like the name of the method, but  
technically, I’m just updating… so is the action then update?

When I rake my routes I should see something like:

move\_tech [GET or PUT] /teches/:id/move {:controller =\>  
“teches”, :action =\> “move” }

or am I completely off-base here?

thanks again for all the help!

…adam
