Class: Spree::Admin::NotificationUsersController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::Admin::NotificationUsersController
- Defined in:
- app/controllers/spree/admin/notification_users_controller.rb
Constant Summary collapse
- RESULTS_LIMIT =
20
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/spree/admin/notification_users_controller.rb', line 8 def index notification = SpreeCmCommissioner::CustomerNotification.find(params[:customer_notification_id]) scope = fetch_users_with_device_token(notification) users = search(scope, params[:q]) render json: users.limit(RESULTS_LIMIT).as_json(only: %i[id], methods: %i[display_name]) end |