I'm using draper and want to use one of the decorators in a view.
With HTML everything works, but decorators don't work in the Ajax version - I get an undefined method error.
In CommentDecorator:
delegate_all
def comment_author
"#{user.firstname} #{user.lastname}"
end
In view:
comment.comment_author
I'm using exposure, so I don't need instance variables in views.
you can use
comment.decorate.comment_author