spree-contrib / spree_drop_ship

Spree Drop Shipping Extension
BSD 3-Clause "New" or "Revised" License
104 stars 120 forks source link

Make Shipping State Ransackable. #74

Open robwar opened 8 years ago

robwar commented 8 years ago

Shipping state was not ransackable, and was leading to this error on a fresh install: https://github.com/spree-contrib/spree_drop_ship/issues/73

The "state" attributed just needed to be added to the whitelist.

ajahongir commented 8 years ago

adding these lines in models/spee/shipment_decorator.rb is solved my issue

Spree::Shipment.class_eval do
  self.whitelisted_ransackable_attributes = ['number', 'state']
end