Best practice in Rails when editing scaffold made pages

Posted by abegbg on Stack Overflow See other posts from Stack Overflow or by abegbg
Published on 2012-06-25T14:09:48Z Indexed on 2012/06/25 15:16 UTC
Read the original article Hit count: 194

Filed under:
|

I have a best practice question. I have two classes, company and category. They have a many-to-many relationship. When clicking a category I shall go to a page showing all companies with the chosen category. Pretty straight forward.

My question is:

Should I list all the companies on the companies/index.html.erb after filtering the companies in the controller?

or

Should I list all the companies on the categories/show.html.erb page?

or

Should I do a completely new page, since it doesn't really fit into any of the two above?

Do you generally make a new page when your goal doesn't fit the scaffold made pages or do you use them quite freely?

I am working/learning alone with rails, so there are a lot of best practice questions popping up all the time.

Cheers Carl

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about architecture