I have two models :
class Event < ActiveRecord::Base
belongs_to :destination
end
class Destination < ActiveRecord::Base
has_many :events
end
My “event” model has a “activated” (boolean) field, and i want to show only the activated events when i call Destination.events. How can i always filter on the activated field?
Use the
:conditionsoption: