# Problem in Routing and associations

**URL:** <https://www.ruby-forum.com/t/problem-in-routing-and-associations/190801>\
**Category:** Rails\
**Created:** [June 28, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/problem-in-routing-and-associations/190801 "2010-06-28T12:25:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jatin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@Jatin](https://www.ruby-forum.com/u/Jatin)\
**Post date:** [June 28, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/problem-in-routing-and-associations/190801/1 "2010-06-28T12:25:30Z")

</div>

Hello, I am new to Ruby on Rails and i am stuck on this problem.

I have two models products and categories. I have scaffolded both the  
models with the basic attributes and i am using has\_many through  
associations. Now, i want to add categories for a product, so i have  
made an action select-categories for that which displays check boxes  
and does the saving part. I have done this much.

Now i want to use the above saved categories for the given product and  
assign them priorities, so once i have saved the categories for a  
given product, i want to show the priority\_assign view and that too  
showing the saved categories for the given product and the product id.

help me out.
