Class: Decidim::Comments::CommentFormCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::Comments::CommentFormCell
- Defined in:
- app/cells/decidim/comments/comment_form_cell.rb
Overview
A cell to display a form for adding a new comment.
Instance Method Summary collapse
Instance Method Details
#comment_as_for(form) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/cells/decidim/comments/comment_form_cell.rb', line 9 def comment_as_for(form) return if verified_user_groups.blank? # Note that the form.select does not seem to work correctly in the cell # context. The Rails form builder tries to call @template.select which # is not available for the cell objects. render view: :comment_as, locals: { form: form } end |