Merged
Conversation
6b9a9ed to
0a28543
Compare
Holmes98
previously approved these changes
Dec 22, 2023
Member
Holmes98
left a comment
There was a problem hiding this comment.
Note that truncate(100) returns a string of at most 100 characters, while shorten could return up to 103 characters. But this code is unused anyway, so it doesn't matter.
It's only used in one view, and that view is unused and broken. And anyway, Rails 3 has a built-in truncate method that we can use instead. Suggested-by: Ben Anderson <benanderson@acidic.co.nz>
0a28543 to
63d2cb2
Compare
Holmes98
approved these changes
Dec 22, 2023
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.
Rails 3 has a built-in truncate method that we can use instead.
Also remove the constant SHORTEN_LIMIT, it is only used in two places and removing it makes it easier to update the configuration.
Suggested-by: @bagedevimo
Review and merge after #203 because of merge conflicts.DoneEdit:
The place that uses it is actually dead code. Updating it anyway, can be deleted separately (draft: #205).