Class: AbuseReportsFinder
- Inherits:
-
Object
- Object
- AbuseReportsFinder
- Defined in:
- app/finders/abuse_reports_finder.rb
Constant Summary collapse
- STATUS_OPEN =
'open'
- DEFAULT_SORT_STATUS_CLOSED =
'created_at_desc'
- ALLOWED_SORT =
DEFAULT_SORT_STATUS_CLOSED, *%w[created_at_asc updated_at_desc updated_at_asc]].freeze
- DEFAULT_SORT_STATUS_OPEN =
'number_of_reports_desc'
- SORT_BY_COUNT =
[DEFAULT_SORT_STATUS_OPEN].freeze
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(params = {}) ⇒ AbuseReportsFinder
constructor
A new instance of AbuseReportsFinder.
Constructor Details
#initialize(params = {}) ⇒ AbuseReportsFinder
Returns a new instance of AbuseReportsFinder.
14 15 16 17 |
# File 'app/finders/abuse_reports_finder.rb', line 14 def initialize(params = {}) @params = params @reports = AbuseReport.all end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'app/finders/abuse_reports_finder.rb', line 4 def params @params end |
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
4 5 6 |
# File 'app/finders/abuse_reports_finder.rb', line 4 def reports @reports end |