Sha256: c2f3f61f51d56557ece08beabace612e2d516ebae77aa5f4310581476b3b1ecd

Contents?: true

Size: 557 Bytes

Versions: 8

Compression:

Stored size: 557 Bytes

Contents

# To add Grape support, require 'grape/active_model_serializers' in the base of your Grape endpoints
# Then add 'include Grape::ActiveModelSerializers' to enable the formatter and helpers
require 'active_model_serializers'
require 'grape/formatters/active_model_serializers'
require 'grape/helpers/active_model_serializers'

module Grape
  module ActiveModelSerializers
    extend ActiveSupport::Concern

    included do
      formatter :json, Grape::Formatters::ActiveModelSerializers
      helpers Grape::Helpers::ActiveModelSerializers
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
active_model_serializers-0.10.8 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.7 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.6 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.5 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.4 lib/grape/active_model_serializers.rb
agi_active_model_serializers-0.10.7 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.3 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.2 lib/grape/active_model_serializers.rb