# Seeking best practise advise

**URL:** <https://www.ruby-forum.com/t/seeking-best-practise-advise/181122>\
**Category:** Rails\
**Created:** [January 5, 2010, 10:20pm UTC](https://www.ruby-forum.com/t/seeking-best-practise-advise/181122 "2010-01-05T22:20:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@johnny](https://www.ruby-forum.com/u/johnny)\
**Post date:** [January 5, 2010, 10:20pm UTC](https://www.ruby-forum.com/t/seeking-best-practise-advise/181122/1 "2010-01-05T22:20:30Z")

</div>

I am doing this app, account - project - category orientated. Category  
can belong to an account (url: [account.example.com/categories](http://account.example.com/categories)) or  
specific to a project (url: [account.example.com/projects/1/](http://account.example.com/projects/1/)  
categories), my question is:

1. is this url structure the proper way to do it?
2. inside the category controller, to determine whether the category  
belong to an account or a project, i use “if param[‘project\_id’]”,  
again is this the proper way to do it?

Appreciate any help,

Regards,

johnny

---

<div class="post-metadata">

**Author:** ![johnny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@johnny](https://www.ruby-forum.com/u/johnny)\
**Post date:** [January 5, 2010, 10:24pm UTC](https://www.ruby-forum.com/t/seeking-best-practise-advise/181122/2 "2010-01-05T22:24:36Z")

</div>

You may find reading this helpful.

> **[Beginners Tutorial: Routing in Rails 2.0 (with REST) – Part 1 of n](https://darynholmes.wordpress.com/2008/03/15/beginners-tutorial-routing-in-rails-20-with-rest-part-1-of-n/)**
>
> Part 2 About this series This is a series for beginners wanting to learn about routing in Rails 2.0. This first post is aimed at exploring the behaviour of routing in Rails. It examines what happen…
