Skip to content

Commit

Permalink
Ensure nested attrs on band before spec
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Sep 1, 2012
1 parent 1159135 commit 5a15029
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions spec/app/models/band.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/mongoid/callbacks_spec.rb
Expand Up @@ -345,6 +345,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
Expand Down

0 comments on commit 5a15029

Please sign in to comment.