We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
In order to have path helpers available in draper helper (h), add the following code to an initializer (config/initializers/draper.rb):
h
module Draper class HelperProxy include Rails.application.routes.url_helpers default_url_options[:host] = ::Rails.application.routes.default_url_options[:host] end end
and under config/environments/development.rb and all other environment files, add
config/environments/development.rb
routes.default_url_options = { host: "local.dev.com", port: 3000 }
To mix Rails, Draper, Rabl and Grape together, see also https://github.com/nesquena/rabl/wiki/Using-Rabl-with-Grape
And add to your Grape module:
represent Draper::Decorator, with: RablPresenter represent Draper::CollectionDecorator, with: RablPresenter