Jeremy Rodi
Jeremy Rodi
Yes; let me know if there is anything I need to do.
I don't think it should be called `custom_error`; I think it should be something like `tag_missing`, in style of `method_missing`.
If you equate components with methods, then ideally, it should return true; if you redefine `method_missing` it's good practice to implement `respond_to_missing?` which causes `respond_to?` to return true for methods...
While I understand the reasoning behind this, I don't fully support this because of the fact that this method can no longer be used internally by the presenter class reliably....
I like the `presents delegate:...` syntax; maybe `exposes_fields :user, :id, :name`, which creates a user method that takes one argument, so you can do `{{user.name}}` and `{{user.id}}`?
@dasch while that does seem reasonable, I really like being able to "namespace" specific fields as it were, so that doing something like this is feasible: ``` ruby class SomePresenter...
@dasch would it be possible, then, to have a specific syntax dedicated to creating a context presenter?
@dasch You'd have to do this: ``` ruby class UserPresenter < Curly::Presenter presents :user delegate :id, :name, to: :@user end ```
I was more thinking of something like this: ``` ruby class Articles::ShowPresenter < Curly::Presenter presents :article, :user context :user, delegate: [:id, :name] end ``` Which is the same as: ```...
@FunkyLoveCow it is something we are supporting, I believe.