Sha256: 76ea5f2f7025e2e3734d225b37f6eeab1d92772ee8895a15108170fd6470c921

Contents?: true

Size: 560 Bytes

Versions: 6

Compression:

Stored size: 560 Bytes

Contents

require 'rails/railtie'
require 'action_controller'
require 'action_controller/railtie'
require 'action_controller/serialization'

module ActiveModelSerializers
  class Railtie < Rails::Railtie
    initializer 'jsonapi_compliable.register_renderer' do
      require 'active_model_serializers/register_jsonapi_renderer'
    end

    initializer 'jsonapi_compliable.configure_ams' do
      if ActiveModelSerializers.config.respond_to?(:include_data_default)
        ActiveModelSerializers.config.include_data_default = :if_sideloaded
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jsonapi_compliable-0.3.10 lib/jsonapi_compliable/railtie.rb
jsonapi_compliable-0.3.9 lib/jsonapi_compliable/railtie.rb
jsonapi_compliable-0.3.8 lib/jsonapi_compliable/railtie.rb
jsonapi_compliable-0.3.7 lib/jsonapi_compliable/railtie.rb
jsonapi_compliable-0.3.6 lib/jsonapi_compliable/railtie.rb
jsonapi_compliable-0.3.5 lib/jsonapi_compliable/railtie.rb