2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-12-14 13:19:24 +00:00
|
|
|
module ApplicationController::HasResponseExtentions
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def response_expand?
|
|
|
|
return true if params[:expand] == true
|
|
|
|
return true if params[:expand] == 'true'
|
|
|
|
return true if params[:expand] == 1
|
|
|
|
return true if params[:expand] == '1'
|
|
|
|
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def response_full?
|
|
|
|
return true if params[:full] == true
|
|
|
|
return true if params[:full] == 'true'
|
|
|
|
return true if params[:full] == 1
|
|
|
|
return true if params[:full] == '1'
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2017-12-14 13:19:24 +00:00
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def response_all?
|
|
|
|
return true if params[:all] == true
|
|
|
|
return true if params[:all] == 'true'
|
|
|
|
return true if params[:all] == 1
|
|
|
|
return true if params[:all] == '1'
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2017-12-14 13:19:24 +00:00
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|