Remove unnecessary comments in cache_helper.rb [ci skip] #27760
Merged
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.
I looked into a TODO comment in cache_helper.rb.
I think we can remove those comments.
the comments were added in this commit: 9de8305
Below is a pic of the commit opened in RubyMine.
I guess he left the comment because he thought
capture
method would be able to work by its own without 'the dance' in his future.I git-reseted to see the code at the time. The methods named
capture
were inActionView::Helpers::CaptureHelper(which exists in current master branch, too)
andRails::Generators::TestCase
. in this case, it is obvious that he meant the first one.Now, we can use
capture
not only in erb, but builder and jbuilder with no problem even withoutwrite_fragment_for
.From these reasons, those long lived comments can go.
To be honest, I'm not 100% sure the intention of his comments.
Please let me know if there is someone who knows what he meant, and who thinks I'm wrong. If so, I want to try to deal with it.
Personally, I don't think it is a good idea to ignore TODO comments such a long time(6 years in this case).