Added Submission::link and Comment::comment_link#82
Open
khalilfazal wants to merge 7 commits intoavinashbot:masterfrom
Open
Added Submission::link and Comment::comment_link#82khalilfazal wants to merge 7 commits intoavinashbot:masterfrom
khalilfazal wants to merge 7 commits intoavinashbot:masterfrom
Conversation
the method names are confusing. Why does Comment::link return the link to the submission instead?
Added Comment::comment_link
houndci-bot
reviewed
Jun 30, 2018
lib/redd/models/submission.rb
Outdated
| def link | ||
| "https://www.reddit.com#{permalink}" | ||
| end | ||
|
|
There was a problem hiding this comment.
Layout/TrailingWhitespace: Trailing whitespace detected.
lib/redd/models/comment.rb
Outdated
| def comment_link | ||
| link.link + id | ||
| end | ||
|
|
There was a problem hiding this comment.
Layout/TrailingWhitespace: Trailing whitespace detected.
removed whitespace
removed whitespace
Author
|
So I don't think it's my fault that travis can't build. It is having trouble installing jruby. |
|
Reddit calls a submission also a link. Please suffix your functions with |
Suggestion from Stephan Meijer: Reddit calls a submission also a link. Please suffix your functions with _url instead of _link.
|
Maybe change to other link-function to url as well? |
|
Thank you. I will merge it into my fork (https://github.com/StephanMeijer/redd/) |
Repository owner
deleted a comment from
katsavav
Feb 5, 2024
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.
The method names are confusing.
Why does Submission::permalink return a relative path instead of an absolute path?
Why does Comment::link return the link to the submission instead of a link to the comment itself?