# Playing with routes Rails 2.3

**URL:** <https://www.ruby-forum.com/t/playing-with-routes-rails-2-3/172812>\
**Category:** Rails\
**Created:** [July 28, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/playing-with-routes-rails-2-3/172812 "2009-07-28T12:43:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [July 28, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/playing-with-routes-rails-2-3/172812/1 "2009-07-28T12:43:32Z")

</div>

Okay, I’m just getting back into using Rails for a few private projects  
and  
am trying to stick to the RESTful way of doing things.

If I have a teacher model and a lesson model, the basic scaffold setup  
to  
create these items is fine. But then I have the relationship that a  
teacher  
habtm lessons and a lesson habtm teachers.

The logical place to implement that is in the teachers\_controller but  
I’d  
like to know the best route to make.

I’ve added this to my config/routes.rb …

map.resources :teachers, :member =\> { :new\_teacher\_pool =\> :get,

:create\_teacher\_pool =\> :post}

which allows me URLs like teacher/1/new\_teacher\_pool and  
/teacher/1/create\_teacher\_pool but I don’t know if I should just be  
using  
the default controller and use a URL such as /teacher/new\_pool/1 and  
/teacher/create\_pool/1(posted pool\_id(s)) etc.

What’s the best way to approach this?

Thanks in advance

-Ants

–
