Sha256: f952d2886279d082d6274a0a59d60a845bb0faf7f5f5906790547a8b59d5284a

Contents?: true

Size: 323 Bytes

Versions: 6

Compression:

Stored size: 323 Bytes

Contents

module InfinumJsonApiSetup
  module JsonApi
    module RequestParsing
      def relationship_children_ids(type)
        data_params.filter_map do |p|
          next if p[:type] != type

          p[:id].to_i
        end.uniq
      end

      def data_params
        params.to_unsafe_hash[:data]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
infinum_json_api_setup-0.0.8 lib/infinum_json_api_setup/json_api/request_parsing.rb
infinum_json_api_setup-0.0.7 lib/infinum_json_api_setup/json_api/request_parsing.rb
infinum_json_api_setup-0.0.6 lib/infinum_json_api_setup/json_api/request_parsing.rb
infinum_json_api_setup-0.0.5 lib/infinum_json_api_setup/json_api/request_parsing.rb
infinum_json_api_setup-0.0.4 lib/infinum_json_api_setup/json_api/request_parsing.rb
infinum_json_api_setup-0.0.3 lib/infinum_json_api_setup/json_api/request_parsing.rb