zammad/app/controllers/application_controller/has_response_extentions.rb
2026-01-02 15:41:09 +02:00

27 lines
636 B
Ruby

# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
module ApplicationController::HasResponseExtentions
extend ActiveSupport::Concern
private
def response_expand?
ActiveModel::Type::Boolean.new.cast params[:expand]
end
def response_full?
ActiveModel::Type::Boolean.new.cast params[:full]
end
def response_all?
ActiveModel::Type::Boolean.new.cast params[:all]
end
def response_only_total_count?
ActiveModel::Type::Boolean.new.cast params[:only_total_count]
end
def response_with_total_count?
ActiveModel::Type::Boolean.new.cast params[:with_total_count]
end
end