mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
- ActiveModelSerializers::JsonPointer - ActiveModel::Serializer::Adapter::JsonApi::Error - ActiveModel::Serializer::Adapter::JsonApi::Error.attributes - Fix rubocop config
15 lines
289 B
Ruby
15 lines
289 B
Ruby
module ActiveModelSerializers
|
|
module JsonPointer
|
|
module_function
|
|
|
|
POINTERS = {
|
|
attribute: '/data/attributes/%s'.freeze,
|
|
primary_data: '/data'.freeze
|
|
}.freeze
|
|
|
|
def new(pointer_type, value = nil)
|
|
format(POINTERS[pointer_type], value)
|
|
end
|
|
end
|
|
end
|