Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure nested attrs on band before spec

  • Loading branch information...
commit fec64f88bb071e7a212b29044985e05f99461e6d 1 parent 5350182
@durran durran authored
Showing with 1 addition and 2 deletions.
  1. +0 −2  spec/app/models/band.rb
  2. +1 −0  spec/mongoid/callbacks_spec.rb
View
2  spec/app/models/band.rb
@@ -15,8 +15,6 @@ class Band
embeds_many :notes, as: :noteable, cascade_callbacks: true, validate: false
embeds_one :label, cascade_callbacks: true
- accepts_nested_attributes_for :records, allow_destroy: true
-
after_upsert do |doc|
doc.upserted = true
end
View
1  spec/mongoid/callbacks_spec.rb
@@ -435,6 +435,7 @@ class TestClass
end
it "does not cascade to the child" do
+ Band.accepts_nested_attributes_for :records, allow_destroy: true
band.update_attributes(attributes).should be_true
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.