Skip to content

Commit

Permalink
replace Shop with self inside shop model
Browse files Browse the repository at this point in the history
following the README
when ShopifySessionRepository.storage = Shop is enabled in
config/initializers/shopify_session_repository.rb
and the Shop model is modified
it gives error :
ArgumentError (A copy of Shop has been removed from the module tree but is still active!)
in development.

to solve the error Shop is replaced with identifier self.
this solves the error in a simple manner

so changes are made to the gerenrated file
config/initializers/shopify_session_repository.rb
  • Loading branch information
shalilawaley committed Mar 6, 2015
1 parent c6b84a4 commit 20f293a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -8,13 +8,13 @@
#
# class Shop < ActiveRecord::Base
# def self.store(session)
# shop = Shop.new(domain: session.url, token: session.token)
# shop = self.new(domain: session.url, token: session.token)
# shop.save!
# shop.id
# end
#
# def self.retrieve(id)
# if shop = Shop.where(id: id).first
# if shop = self.where(id: id).first
# ShopifyAPI::Session.new(shop.domain, shop.token)
# end
# end
Expand Down

0 comments on commit 20f293a

Please sign in to comment.