Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state_changes to be destroyed when the associated order is destroyed #4

Merged
merged 1 commit into from
Oct 13, 2015

Conversation

uri
Copy link

@uri uri commented Oct 13, 2015

I want to use the orders#empty! for the iPad api. I checked to see what were the latest changes in upstream and they added removing state change records to this. The following is the original quote body

Here is the original issue that was referenced: spree#6370.

@@ -37,7 +37,8 @@ class Order < ActiveRecord::Base

alias_attribute :ship_total, :shipment_total

has_many :state_changes, as: :stateful
belongs_to :store, class_name: 'Spree::Store'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition was part of a merge conflict I had to resolve when cherry-picking. I'm a little perplexed on why it's actually an addition as it was present in the parent branch.

@uri
Copy link
Author

uri commented Oct 13, 2015

This change was done via cherry-pick. I only had to resolve a simple conflict.

@kurtfunai
Copy link

Looks reasonable to me - weird about the belongs_to :store thing though.

kurtfunai added a commit that referenced this pull request Oct 13, 2015
Fix state_changes to be destroyed when the associated order is destroyed
@kurtfunai kurtfunai merged commit e421ae8 into 2-2-stable-healthwave Oct 13, 2015
@kurtfunai kurtfunai deleted the empty-upstream branch October 13, 2015 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants