Skip to content

Conversation

@khalilfazal
Copy link

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?

kha-faz added 3 commits June 30, 2018 15:20
the method names are confusing. Why does Comment::link return the link to the submission instead?
Added Comment::comment_link
def link
"https://www.reddit.com#{permalink}"
end

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.

def comment_link
link.link + id
end

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.

kha-faz added 2 commits June 30, 2018 15:30
removed whitespace
removed whitespace
@khalilfazal
Copy link
Author

So I don't think it's my fault that travis can't build. It is having trouble installing jruby.

@StephanMeijer
Copy link

Reddit calls a submission also a link. Please suffix your functions with _url instead of _link.

Suggestion from Stephan Meijer:

Reddit calls a submission also a link. Please suffix your functions with _url instead of _link.
@StephanMeijer
Copy link

Maybe change to other link-function to url as well?

@StephanMeijer
Copy link

Thank you. I will merge it into my fork (https://github.com/StephanMeijer/redd/)

Repository owner deleted a comment from katsavav Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants