Class: Workarea::Api::Admin::ShippingsController
Instance Method Summary
collapse
#current_user, #sort_direction, #sort_field
Instance Method Details
#index ⇒ Object
52
53
54
55
56
57
58
59
|
# File 'app/controllers/workarea/api/admin/shippings_controller.rb', line 52
def index
@shippings = Shipping
.all
.order_by(sort_field => sort_direction)
.page(params[:page])
respond_with shippings: @shippings
end
|
#show ⇒ Object
98
99
100
101
|
# File 'app/controllers/workarea/api/admin/shippings_controller.rb', line 98
def show
@shipping = Shipping.find(params[:id])
respond_with shipping: @shipping
end
|