spree-multi-domain
spree-multi-domain copied to clipboard
current method in Tracker decorator have conflict with the method in Spree core
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'
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