Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
tovodeverett opened this Issue · 2 comments

4 participants

Toby Ovod-Everett Kristian Mandrup Steve Klabnik Andrew Haines
Toby Ovod-Everett

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.

Kristian Mandrup

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

Steve Klabnik
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. :)

Andrew Haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Andrew Haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Andrew Haines haines referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Andrew Haines haines closed this issue from a commit
Andrew Haines haines Rewrite README
Closes #364
Closes #368
Closes #371
[ci skip]
52360b6
Andrew 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.