Class: Gemgento::User::OrdersController

Inherits:
BaseController show all
Defined in:
app/controllers/gemgento/user/orders_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
# File 'app/controllers/gemgento/user/orders_controller.rb', line 4

def index
  @orders = current_user.orders.where.not(status: [nil, '']).order('created_at DESC')

  respond_with @orders
end

#showObject



10
11
12
13
14
# File 'app/controllers/gemgento/user/orders_controller.rb', line 10

def show
  @order = Order.find_by(increment_id: params[:id], user: current_user)

  respond_with @order
end