Sha256: 5d9fe6e0be45f98287c8f6256f42ddba62d453a26c8781ec4bd6a381fe191831

Contents?: true

Size: 329 Bytes

Versions: 1

Compression:

Stored size: 329 Bytes

Contents

module GrapeRabl
  module Render
    def render(options = {})
      env['api.endpoint'].options[:route_options][:rabl] = options.delete(:rabl) if options.include?(:rabl)
      env['api.endpoint'].options[:route_options][:rabl_locals] = options.delete(:locals)
    end
  end
end

Grape::Endpoint.send(:include, GrapeRabl::Render)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape-rabl-0.3.0 lib/grape-rabl/render.rb