so, I have seen people dancing around this topic, but I can't find the answer. I just installed the 'draper' gem with rails. It's great, but I want to be able to use it with angularjs. Is there a way to do that? Or do I need to just make a costum decorator in angularjs.... which would mean my 'draper' gem is useless:
class PageDecorator < Draper::Decorator
delegate_all
def emphatic
object.text.upcase
end
end
and my html is:
<li class="gregli" ng-repeat="page in pages">
{{ page.text }}
</li>
and my rails controller is:
def index
@pages = Page.all.decorate
render json: @pages
end