Sha256: 956fed6d6d37bc889c91c9d8349aa9fc9597f951ea42f8de5c637ca4185776d0
Contents?: true
Size: 612 Bytes
Versions: 1
Compression:
Stored size: 612 Bytes
Contents
# You should replace InMemorySessionStore with what you will be using # in Production # # Interface to implement are self.retrieve(id) and self.store(ShopifyAPI::Session) # # Here is how you would add these functions to an ActiveRecord: # # class Shop < ActiveRecord::Base # def self.store(session) # shop = Shop.new(domain: session.url, token: session.token) # shop.save! # shop.id # end # # def self.retrieve(id) # if shop = Shop.where(id: id).first # ShopifyAPI::Session.new(shop.domain, shop.token) # end # end # end ShopifySessionRepository.storage = InMemorySessionStore
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shopify_app-5.0.1 | lib/generators/shopify_app/templates/config/initializers/shopify_session_repository.rb |