Jump to content

The ultimate community for Ruby on Rails developers.


Displaying only select database records

  • Please log in to reply
No replies to this topic

#1 DvDj



  • Members
  • 20 posts
  • LocationUnited Kingdom

Posted 08 August 2014 - 11:53 AM



My app has a database of products, one of the columns in this database is called 'section'.  I want to present to the user all of the products that relate to a section.


The index view has links to each of these sections.  When the user clicks on a section link I want to present to them only the products from the chosen section.


I have all of the links working and the views are ready to display this content but I am getting very confused as to the best method to use to achieve this presentation.


I'm thinking that maybe I need to define an array of section values within the index model and then call upon this array from each of the views?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users