Description
Rails server logged these warnings:
W, [2018-03-27T18:09:54.706656 #23348] WARN -- : Creating scope :loyalty_points_not_awarded. Overwriting existing method Spree::Order.loyalty_points_not_awarded.
W, [2018-03-27T18:09:54.706758 #23348] WARN -- : Creating scope :with_hours_since_payment. Overwriting existing method Spree::Order.with_hours_since_payment.
W, [2018-03-27T18:09:54.706808 #23348] WARN -- : Creating scope :with_uncredited_loyalty_points. Overwriting existing method Spree::Order.with_uncredited_loyalty_points.
I run:
bundle exec rake spree:loyalty_points:award
rake aborted!
ArgumentError: wrong number of arguments (given 0, expected 1)
with spree-loyalty-points/app/models/concerns/spree/order/loyalty_points.rb
Line 15:
create_credit_transaction(loyalty_points_earned)
Line 32:
uncredited_orders.each do |order|
Line 33:
order.award_loyalty_points
Line 40:
user.loyalty_points_credit_transactions.create(source: self, loyalty_points: points)
Traceback (most recent call last):
from app/models/spree/order_decorator.rb:11:in block (2 levels) in <top (required)>
ArgumentError (wrong number of arguments (given 0, expected 1))
Line 11: scope :with_hours_since_payment, ->(num) { where('
spree_orders.
paid_at < ? ', num.hours.ago) }
from app/models/spree/order_decorator.rb:13:in block (2 levels) in <top (required)>
ArgumentError (wrong number of arguments (given 0, expected 1))
Line 13: scope :with_uncredited_loyalty_points, ->(num) { with_hours_since_payment(num).loyalty_points_not_awarded }
Please confirm this gem does work, or should do something with spree-loyalty-points/app/models/concerns/spree/order/loyalty_points.rb and spree-loyalty-points/app/models/spree/order_decorator.rb