Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

current method in Tracker decorator have conflict with the method in Spree core #104

Open
sanchojaf opened this issue Sep 27, 2014 · 1 comment

Comments

@sanchojaf
Copy link

current method in Tracker decorator have conflict with the method in Spree core

ArgumentError - wrong number of arguments (0 for 1):
/spree-multi-domain/app/models/spree/tracker_decorator.rb:4:in current' app/views/spree/shared/_google_analytics.html.erb:1:in_a7721bcc461d6fdcbf5840cd55249711'
actionview (4.1.4) lib/action_view/template.rb:145:in `block in render'

@sanchojaf sanchojaf reopened this Sep 27, 2014
@schmijos
Copy link

Correct. At least tracker_decorator should implement the current method like that:

def self.current(domain = nil)
    domain ||= Spree::Store.current.url
    Spree::Tracker.where(:active => true, :environment => Rails.env).joins(:store).where("spree_stores.url LIKE ?", "%#{domain}%").first
end

See pull request #110

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants