This is the structure of my database in Ruby on Rails:
user have many notes
notes have many categories
categories have many notes
I have setup this relationship with has_many :through. I use
current_user.notes
to get the notes belonging to the user. But what is the best way to get the notes belonging to the current user that have a certain category? Am I supposed to use find methods like I would on a model? Thanks for reading.