Sha256: 87d6986e053c4590370a6fc787b7c1915e1e713586f74cf522ae0cc74e1f2ef7

Contents?: true

Size: 588 Bytes

Versions: 8

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true

# 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.15 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.14 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.13 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.12 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.11 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.10 lib/grape/active_model_serializers.rb
active_model_serializers_custom-0.10.90 lib/grape/active_model_serializers.rb
active_model_serializers-0.10.9 lib/grape/active_model_serializers.rb