app/models/membership_change.rb in artfully_ose-1.2.0 vs app/models/membership_change.rb in artfully_ose-1.3.0.pre1

- old
+ new

@@ -97,11 +97,10 @@ membership.price = membership.membership_type.price membership.cart_price = price membership.sold_price = price membership.total_paid = old.total_paid + price - membership.member = person.member membership.changed_membership = old membership end @@ -147,10 +146,16 @@ # Expire old memberships changing_memberships.each do |old| old.adjust_expiration_to(expiration) end + + # Assign the new memberships + new_memberships.each do |n| + n.member_id = person.member.id + n.save! + end end true rescue MembershipChange::Error => e payment.errors[:base].each do |msg| errors.add(:base, msg) @@ -180,8 +185,19 @@ ChangeAction end def set_details self.details = "Membership type change." + end + + # + # 1 if realized_fee should be charged + # 0 otherwise + # + # This is used when setting realized_price on item + # at order creation time. + # + def realized_fee_modifier + 0 end end end