I have a website where Restaurants can belong to one of many Features,
such as “vegitarian friendly”, “child friendly” etc. This is modelled as
a habtm relationship.
What I want to achieve is to have a checkbox for each feature and a
submit button. I then want to display only those restaurants that belong
to the checked features.
For example, if the user checks “Child Friendly” and “Vegitarian
Friendly” I only want to display restaurants the belong to BOTH of those
features. Adversely if the user just checks “Child Friendly” I want only
restaurants that belong to that feature to be displayed. It doesnt
matter if the restaurants belong to other features as long as they
belong to all of the checked features.
I’m wondering what the best way to do this is, as I’ve never (yet)
written a method that has to find by an unknown number of parameters?