Class: Decidim::FlagModalCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::FlagModalCell
- Includes:
- ActionView::Helpers::FormOptionsHelper
- Defined in:
- decidim-core/app/cells/decidim/flag_modal_cell.rb
Instance Method Summary collapse
Instance Method Details
#cache_hash ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'decidim-core/app/cells/decidim/flag_modal_cell.rb', line 11 def cache_hash hash = [] hash.push(I18n.locale) hash.push(current_user.try(:id)) hash.push(model.reported_by?(current_user) ? 1 : 0) hash.push(model.class.name.gsub("::", ":")) hash.push(model.id) hash.join(Decidim.cache_key_separator) end |
#flag_user ⇒ Object
7 8 9 |
# File 'decidim-core/app/cells/decidim/flag_modal_cell.rb', line 7 def flag_user render end |