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

Paranoia update #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update to paranoia 2.1.x
Fixes compatibility with paranoia 2.1.0 where AR::Base#destroyed? is no
longer overridden.

Previous version restriction on paranoia was probably too loose. It now
restricts to 2.1.x

Fixes #5965
Fixes #5959
  • Loading branch information
jhawthorn authored and Clarke Brunsdon committed May 6, 2015
commit e35e9ae260abdfab74a26a27ecad4f1b640773e9
4 changes: 2 additions & 2 deletions core/app/models/spree/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ def insufficient_stock_lines
end

##
# Check to see if any line item variants are soft, deleted.
# Check to see if any line item variants are soft deleted.
# If so add error and restart checkout.
def ensure_line_item_variants_are_not_deleted
if line_items.select{ |li| li.variant.destroyed? }.present?
if line_items.any?{ |li| !li.variant || li.variant.paranoia_destroyed? }
errors.add(:base, Spree.t(:deleted_variants_present))
restart_checkout_flow
false
Expand Down
2 changes: 1 addition & 1 deletion core/spree_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_dependency 'kaminari', '~> 0.15', '>= 0.15.1'
s.add_dependency 'monetize', '~> 1.1'
s.add_dependency 'paperclip', '~> 4.2.0'
s.add_dependency 'paranoia', '~> 2.0.5'
s.add_dependency 'paranoia', '~> 2.1.0'
s.add_dependency 'premailer-rails'
s.add_dependency 'rails', '~> 4.1.8'
s.add_dependency 'ransack', '~> 1.6.0'
Expand Down