validates :name, :presence => true, :length => {:maximum => 30}
validates :user_id, :numericality => true, :existence => {:both => false}
- validates :provider_id, :numericality => {:allow_nil => true}
+ validates :provider, :numericality => {:allow_nil => true}
def supply_default
self.name = 'no name' if self.name.blank?
end
def self.list_where
- 'artists.provider_id is null'
+ 'artists.provider is null'
end
def self.show_opt