* First draft - all the big changes * Changing some more references to 'internal' * Relocate internal request tests to admin * Relocate internal system tests to admin * Fix trailing space * Test fix * Move queries from internal to admin * Docs updates * Rename internal stimuls controllers to admin (plus docs) * Rename admin layout * Fix routing after rebase * Fixes for latest added admin interfaces * Serviceworker ignore paths
17 lines
500 B
Ruby
17 lines
500 B
Ruby
module Admin
|
|
class PrivilegedReactionsController < Admin::ApplicationController
|
|
layout "admin"
|
|
|
|
PRIVILEGED_REACTION_CATEGORIES = %i[thumbsup thumbsdown vomit].freeze
|
|
|
|
def index
|
|
@q = Reaction
|
|
.includes(:user,
|
|
:reactable)
|
|
.where("category IN (?)", PRIVILEGED_REACTION_CATEGORIES)
|
|
.order("reactions.created_at" => :desc)
|
|
.ransack(params[:q])
|
|
@privileged_reactions = @q.result.page(params[:page] || 1).per(25)
|
|
end
|
|
end
|
|
end
|