Module: ShopifyAPI
- Defined in:
- lib/shopify-routes.rb
Class Method Summary collapse
-
.routes(router, options = {}) ⇒ Object
use this in your ‘config/routes.rb` file to draw the Shopify routes.
Class Method Details
.routes(router, options = {}) ⇒ Object
use this in your ‘config/routes.rb` file to draw the Shopify routes
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/shopify-routes.rb', line 28 def routes(router, = {}) # cache the router @router = router # extract the referrer from the options, if it's included @ref = "?ref=#{[:referrer]}" if .include? :referrer # default namespace [:namespace] ||= :shopify # extract the :only, or :except options, if they're included @only = Array([:only]) if .include?(:only) @except = Array([:except]) if .include?(:except) # draw the routes draw end |