Class: Decidim::Notify::NoteCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::Notify::NoteCell
- Includes:
- LayoutHelper
- Defined in:
- app/cells/decidim/notify/note_cell.rb
Overview
This cell renders the card for an instance of a Notify Participant
Instance Method Summary collapse
Instance Method Details
#edit_path ⇒ Object
33 34 35 |
# File 'app/cells/decidim/notify/note_cell.rb', line 33 def edit_path EngineRouter.main_proxy(model.component).conversation_path(model.id) end |
#note_author_class ⇒ Object
27 28 29 30 31 |
# File 'app/cells/decidim/notify/note_cell.rb', line 27 def return "by-note-taker" if &.admin "by-participant" end |
#note_taker? ⇒ Boolean
21 22 23 24 25 |
# File 'app/cells/decidim/notify/note_cell.rb', line 21 def note_taker? return unless current_user Author.for(model.component).note_takers.find_by(user: current_user) end |
#notify_author ⇒ Object
17 18 19 |
# File 'app/cells/decidim/notify/note_cell.rb', line 17 def Author.find_by(user: model., component: model.component) end |