search for: sector_should_not_be_blank

Displaying 1 result from an estimated 1 matches for "sector_should_not_be_blank".

2011 Feb 23
3
validates, what's wrong?
class Category < ActiveRecord::Base belongs_to :sector has_and_belongs_to_many :suppliers 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