Sha256: 93471c369404699038ecd582cb485ef3fe0bd92de2acce73c89ea37ddb9103a1

Contents?: true

Size: 513 Bytes

Versions: 14

Compression:

Stored size: 513 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 10 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

14 entries across 14 versions & 2 rubygems

Version Path
shopify_app-5.0.2 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-5.0.1 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app_lrb3-5.0.0 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-5.0.0 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.6 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.5 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.4 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.2 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.1 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.4.0 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.2.3 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.2.2 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.2.1 lib/generators/shopify_app/templates/app/controllers/home_controller.rb
shopify_app-4.2.0 lib/generators/shopify_app/templates/app/controllers/home_controller.rb