class Category < ActiveRecord::Base
validates :sector, :name, :presence => true
As you see I have validates :sector, :presence => true.
When I create a new Category, if I don’t select a sector I have an
error page with the message:
Couldn’t find Sector with ID=
But there is the validates, why I don’t have the message sector can’t be