-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Submission::link and Comment::comment_link #82
base: master
Are you sure you want to change the base?
Conversation
the method names are confusing. Why does Comment::link return the link to the submission instead?
Added Comment::comment_link
lib/redd/models/submission.rb
Outdated
def link | ||
"https://www.reddit.com#{permalink}" | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
removed whitespace
removed whitespace
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/) |
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?