Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Model#decorate not mentioned in Readme . . . #364

Closed
tovodeverett opened this Issue · 2 comments

4 participants

@tovodeverett

The Readme section "In The Controller" (https://github.com/drapergem/draper#in-the-controller) indicates that there are three ways to get a decorator, but then it only shows two ways. It seems like it's leaving out the most intuitive approach:

Article.find(params[:id]).decorate
Article.all.decorate

This appears to be supported in both 0.18.0 (it's working for me) and I finally found it in Draper::Decoratable in master.

Is there a reason this approach isn't mentioned in the Readme? If it should be in the Readme, it might make sense to also show it in Step 5 of the Quick Start at the beginning of the Readme.

@kristianmandrup

Yeah, README needs update or wiki needs to get some attention and include all these kinds of cases... :)

@steveklabnik
Owner

Yes, once we get everything sorted out with functionality, I want to re-do the entire README before the actual release. I'll leave this open to remind myself that this exact case needs attention. :)

@haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@haines haines closed this issue from a commit
@haines haines Rewrite README
Closes #364
Closes #368
Closes #371
[ci skip]
52360b6
@haines haines closed this in 52360b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.