Sha256: 2d72246dea1bcea1f595421aa4a443d9a1f23126c6835671ba15fa430697b2a9
Contents?: true
Size: 512 Bytes
Versions: 2
Compression:
Stored size: 512 Bytes
Contents
class HomeController < ApplicationController around_filter :shopify_session, :except => 'welcome' def welcome current_host = "#{request.host}#{':' + request.port.to_s if request.port != 80}" @callback_url = "http://#{current_host}/login" end def index # get 5 products @products = ShopifyAPI::Product.find(:all, :params => {:limit => 10}) # get latest 5 orders @orders = ShopifyAPI::Order.find(:all, :params => {:limit => 5, :order => "created_at DESC" }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shopify_app-4.1.1 | lib/generators/shopify_app/templates/app/controllers/home_controller.rb |
shopify_app-4.1.0 | lib/generators/shopify_app/templates/app/controllers/home_controller.rb |