-
Notifications
You must be signed in to change notification settings - Fork 46
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
ArgumentError (wrong number of arguments (given 0, expected 1)) #26
Comments
Hi @99cm , I was trying to replicate your bug with latest(master) branch, although it seems to be working fine there. Can you please specify the versions of spree, rails and ruby you are using. |
ruby 2.5.0 my rails app started 2 years ago with ruby 2.3.0, rails 4.2, spree 3.1, and installed spree-loyalty-points that I believe never working in production, mostly caused by rake cron job failure. there are 3 developers worked on issues, unfortunately, unsolved, because loyalty_points not awarded to user. Readme:
irb output
Since loyalty_points not awarded, one developer wrote a configure code
This effort did not work. |
Hi @99cm, |
Thank you for your time to answer my question and letting me know store credit similar to loyalty points except a method of refund. I knew spree with store credit, but I paid attention to loyalty_points. I'll learn how to use store credit. |
Rails server logged these warnings:
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
The text was updated successfully, but these errors were encountered: