fields do
food_range :text
timestamps
end
has_many :categories, :through => :category_assignments, :accessible => true
has_many :category_assignments, :dependent => :destroy
validates :food_style, :presence => true, :if => "self.categories.include?(:id => 1)"
All I'm trying to do is check if :id => 1 is included in the list of categories. This always returns false at the moment.
Any ideas?
Cheers, Anthony.