NoMethodError raised when voting comments from threads#7880
Merged
mrcasals merged 4 commits intodecidim:developfrom Apr 27, 2021
Merged
Conversation
Contributor
|
Hi @roxanaopr! Thanks for the PR, could you add some tests for it? Thanks! |
mrcasals
suggested changes
Apr 22, 2021
| end | ||
|
|
||
| def target_resource(t_resource) | ||
| t_resource.is_a?(Decidim::Comments::Comment) ? target_resource(t_resource.commentable) : t_resource |
Contributor
There was a problem hiding this comment.
Could you try using comment.root_commentable to get to the parent and avoid the recursive call (and possible N+1s)?
mrcasals
approved these changes
Apr 27, 2021
entantoencuanto
added a commit
that referenced
this pull request
Apr 30, 2021
* develop: Remove creation date from meeting card (#7922) Use NPM instead of yarn on CI (#7919) Validate nickname using correct regexp (#7900) Make webpacker build available in production (#7915) New Crowdin updates (#7911) Open attachments in new tab (#7912) Fix JS errors in the admin panel (#7903) Fix editor: remove br tags from inside a tags (#7901) Authorizable comment action for proposals (#6916) NoMethodError raised when voting comments from threads (#7880) Fix not signed in needs permission redirect for internal links (#7890) Fix meeting registrations questionnaire free text choice answers export (#7892) Store election verifiable results data in election (#7882) New Crowdin updates (#7884)
carlobeltrame
added a commit
to puzzle/decidim-zuerich
that referenced
this pull request
Sep 6, 2021
Applies the fix from decidim/decidim#7880 This will be obsolete when we upgrade to decidim 0.25
rossriserose
added a commit
to rossriserose/DECIDIM-ZUERICH
that referenced
this pull request
Dec 19, 2025
Applies the fix from decidim/decidim#7880 This will be obsolete when we upgrade to decidim 0.25
happysemicolon
added a commit
to happysemicolon/DECIDIM-ZUERICH
that referenced
this pull request
Feb 10, 2026
Applies the fix from decidim/decidim#7880 This will be obsolete when we upgrade to decidim 0.25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
When a comment is added you can up-vote or down-vote it and this will trigger a notification in which is included the link to the resource. For the comments from threads this action will raise an error:
📌 Related Issues
Link your PR to an issue
Testing
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots