Sha256: 126ee8ce2ae4776b590f55c3f8b19876f95ae332848cb5529c43247608d427c1

Contents?: true

Size: 360 Bytes

Versions: 3

Compression:

Stored size: 360 Bytes

Contents

class EricWeixin::Wz::Xiaodian::OrdersController < ApplicationController
  def index
    @orders = ::EricWeixin::Xiaodian::Order.all
    @orders = @orders.where("openid = ?", params[:openid]).order('order_create_time DESC') unless params[:openid].blank?
    @orders = @orders.paginate(page: params[:page]||1, per_page: 10)
    render :layout => false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eric_weixin-0.4.2 app/controllers/eric_weixin/wz/xiaodian/orders_controller.rb
eric_weixin-0.4.1 app/controllers/eric_weixin/wz/xiaodian/orders_controller.rb
eric_weixin-0.4.0 app/controllers/eric_weixin/wz/xiaodian/orders_controller.rb