app/models/pbw/area.rb in pbw-0.1.0 vs app/models/pbw/area.rb in pbw-0.1.1
- old
+ new
@@ -1,11 +1,11 @@
module Pbw
class Area
include ::Mongoid::Document
include ::Mongoid::Timestamps
field :name, type: String
- validates_presence_of :name
- validates_uniqueness_of :name
+
+ validates :name, presence: true
has_many :tokens, :class_name => 'Pbw::Token'
has_many :item_containers, :class_name => 'Pbw::ItemContainer'
has_many :attached_processes, :class_name => 'Pbw::AttachedProcess'
has_and_belongs_to_many :constraints, :class_name => 'Pbw::Constraint'