Class: Launchpad::API::V2::Admin::IEO::OrdersController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Launchpad::ApplicationController
- BaseController
- Launchpad::API::V2::Admin::IEO::OrdersController
- Defined in:
- app/controllers/launchpad/api/v2/admin/ieo/orders_controller.rb
Constant Summary
Constants inherited from BaseController
Instance Method Summary collapse
-
#index ⇒ Object
GET /admin/orders.
Methods inherited from BaseController
Methods included from JWTPayload
#email, #jwt_payload, #role, #uid
Methods included from ExceptionHandlers
Methods included from Response
#controller_namespace, #error_response, #errors_response, #json_response, #not_found
Instance Method Details
#index ⇒ Object
GET /admin/orders
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/launchpad/api/v2/admin/ieo/orders_controller.rb', line 10 def index ransack_params = { uid_eq: params[:uid], state_in: params[:state], sale_id_eq: params[:sale_id], sale_pair_id_eq: params[:sale_pair_id], sale_pair_quote_currency_id_eq: params[:quote_unit], sale_currency_id_eq: params[:base_unit] } orders = Launchpad::IEO::Order.ransack(ransack_params) json_response(paginate(orders.result.includes(:sale, :sale_pair)), 200) end |