Skip to content
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

Update source/topics/decorators.markdown #52

Merged
merged 1 commit into from
Jan 27, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/topics/decorators.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ The resulting HTML looks like this:

Going a step further than Steve's approach:

* Implement an `.index_link` presenter method that output the HTML link with the `REL` attribute set to `"index"`
* Implement an `.index_link` presenter method that outputs the HTML link with the `REL` attribute set to `"index"`
* Implement a `.link` presenter method that outputs a link to the article, but sets the `REL` to `"self"` if the app is currently on that article's show page. If it's called from the index page, make the `REL` `"article_1"` with the correct ID
* Can you abstract this into a `module` such that it could be included in a `CommentPresenter` and work for both? Try it.

Expand Down