Commit 9f2454ede9ce639a5f519bc57aedc24dcff1fb66
1 parent
698514b1
Exists in
master
type_scoped must be presence
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/app/models/magic_field.rb
... | ... | @@ -3,7 +3,7 @@ class MagicField < ActiveRecord::Base |
3 | 3 | has_many :owners, :through => :magic_field_relationships, :as => :owner |
4 | 4 | has_many :magic_attributes, :dependent => :destroy |
5 | 5 | |
6 | - validates_presence_of :name, :datatype, :pretty_name_cn | |
6 | + validates_presence_of :name, :datatype, :pretty_name_cn, :type_scoped | |
7 | 7 | validates_format_of :name, :with => /\A[a-z][a-z0-9_]+\z/ |
8 | 8 | |
9 | 9 | before_save :set_pretty_name | ... | ... |