Class: HomeController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- HomeController
- Defined in:
- lib/generators/versacommerce_app/templates/app/controllers/home_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/generators/versacommerce_app/templates/app/controllers/home_controller.rb', line 5 def index # get 10 products @products = VersacommerceAPI::Product.find(:all, :params => {:limit => 10}) # get latest 5 orders @orders = VersacommerceAPI::Order.find(:all, :params => {:limit => 5, :order => "created_at DESC" }) end |