Commit 254da5682d2ca30759472dc1ce80b6262e11addf
1 parent
64f32ec1
Exists in
master
and in
29 other branches
Fixing comment_form hostspot
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
plugins/comment_group_macro/lib/comment_group_macro_plugin.rb
... | ... | @@ -36,8 +36,10 @@ class CommentGroupMacroPlugin < Noosfero::Plugin |
36 | 36 | end |
37 | 37 | |
38 | 38 | def comment_form_extra_contents(args) |
39 | + comment = args[:comment] | |
40 | + group_id = comment.group_id || args[:group_id] | |
39 | 41 | lambda { |
40 | - hidden_field_tag('comment[group_id]', args[:group_id]) if args.has_key?(:group_id) | |
42 | + hidden_field_tag('comment[group_id]', group_id) if group_id | |
41 | 43 | } |
42 | 44 | end |
43 | 45 | ... | ... |