Class: Workarea::Admin::ChangesetSummaryViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::ChangesetSummaryViewModel
- Defined in:
- app/view_models/workarea/admin/changeset_summary_view_model.rb
Instance Method Summary collapse
Instance Method Details
#count ⇒ Object
6 7 8 |
# File 'app/view_models/workarea/admin/changeset_summary_view_model.rb', line 6 def count model['count'] end |
#label ⇒ Object
18 19 20 |
# File 'app/view_models/workarea/admin/changeset_summary_view_model.rb', line 18 def label type_filter.titleize.pluralize(count) end |
#searchable? ⇒ Boolean
22 23 24 |
# File 'app/view_models/workarea/admin/changeset_summary_view_model.rb', line 22 def searchable? search_model.present? end |
#type ⇒ Object
10 11 12 |
# File 'app/view_models/workarea/admin/changeset_summary_view_model.rb', line 10 def type model['_id'] end |
#type_filter ⇒ Object
14 15 16 |
# File 'app/view_models/workarea/admin/changeset_summary_view_model.rb', line 14 def type_filter search_model&.type || model_name.param_key end |