-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Present with a class that behaves like a hash causes early rendering at best and usually hard to debug errors #1023
Labels
Comments
dblock
changed the title
Present with a class that behaves like a hash causes early rendering
Present with a class that behaves like a hash causes early rendering at best and usually hard to debug errors
Jun 1, 2015
Maybe we can refactor this with some kind of presenter registration DSL? |
Here're some examples of what I have on the rhs of present self, with: PresenterClassThatDoesntCareWhatTheInstanceIs
present Mongoid::Document instance, with: PresenterClass
present Mongoid::Criteria instance, with: PresenterClass |
This was referenced Jun 2, 2015
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A Mongoid::Criteria, for example, responds to
merge
, so this was required to present it. This is because of https://github.com/intridea/grape/blob/master/lib/grape/dsl/inside_route.rb#L209, clearly we need a better solution here, maybe simple by registering representable classes?The text was updated successfully, but these errors were encountered: