i would like to get a arrau of boats, but i would like that just show the boats with rent boolean set to true.
how can acomplish this?
i've added:
@boats = Boat.where(rent: true)
But did not worked
i even tried the method model
def rents
self.class.where(rent: true)
end
and did not worked either
@boats = Boat.where(rent: true)should've worked if you have your tables setup properly for a set of objects.@boats = Boat.where(rent: true)should work. Make sure that you actually have boats with rent = true