Support alternative rendering syntax
joevandyk opened this issue · 4 comments
I'm curious if people would like an option to write:
render Posts::CommentPresenter.new(:comment => comment)
instead of render 'comments', :comment => comment
Might make it more explicit what's happening.
I'm not sure if that exact syntax would be possible, but by implementing to_partial_path
i believe this would:
render Posts::CommentPresenter, comment: comment
That said, I think one of the benefits of Curly is that the caller doesn't even need to know whether a template is Erb or Curly - you can rewrite one in another without having to change anything else.
I agree with @dasch. I think keeping the syntax as rails-like as possible will make your code more flexible in the future.
@joevandyk I'm closing this for now. Please let me know if there's something more that could be added to make the API more clear.