Changing some validations to be compatible with activemodel.
This commit is contained in:
parent
d4010ad76e
commit
58d621d399
11 changed files with 54 additions and 30 deletions
|
@ -730,7 +730,7 @@ describe "ExtendedDocument" do
|
|||
|
||||
it "should not fail if the nested casted model doesn't have validation" do
|
||||
Cat.property :trainer, :cast_as => 'Person'
|
||||
Cat.validates_present :name
|
||||
Cat.validates_presence_of :name
|
||||
cat = Cat.new(:name => 'Mr Bigglesworth')
|
||||
cat.trainer = Person.new
|
||||
cat.trainer.validatable?.should be_false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue