lib/quirky-api/serializers/quirky_serializer.rb
def sub_request_fields(key)
    return unless @opts[:"#{key}_fields"].present? ||
                  @opts[:"#{key}_associations"].present? ||
                  @opts[:"#{key}_extra_fields"].present?

    sub_fields = @opts[:"#{key}_fields"]
    sub_associations = @opts[:"#{key}_associations"]
    sub_opt_fields = @opts[:"#{key}_extra_fields"]

    [sub_fields, sub_associations, sub_opt_fields]
  end
# Returns appropriate sub-fields, sub-associations and/or
# sub-extra_fields for a particular association.
#
# @see get_association
# @return [Array] an array of fields, associations and optional fields.
Returns appropriate sub-fields, sub-associations and/or
sub-extra_fields for a particular association.
Returns appropriate sub - fields sub - associations and / or sub - extra_fields for a particular association .
def sub_request_fields(key)
    return unless @opts[:"#{key}_fields"].present? ||
                  @opts[:"#{key}_associations"].present? ||
                  @opts[:"#{key}_extra_fields"].present?
    sub_fields = @opts[:"#{key}_fields"]
    sub_associations = @opts[:"#{key}_associations"]
    sub_opt_fields = @opts[:"#{key}_extra_fields"]
    [sub_fields, sub_associations, sub_opt_fields]
  end
def sub_request_fields ( key ) return unless @opts [ :" #{ key } _fields " ] . present? || @opts [ :" #{ key } _associations " ] . present? || @opts [ :" #{ key } _extra_fields " ] . present? sub_fields = @opts [ :" #{ key } _fields " ] sub_associations = @opts [ :" #{ key } _associations " ] sub_opt_fields = @opts [ :" #{ key } _extra_fields " ] [ sub_fields , sub_associations , sub_opt_fields ] end
Returns appropriate sub-fields, sub-associations and/or
sub-extra_fields for a particular association.
Returns appropriate sub - fields sub - associations and / or sub - extra_fields for a particular association .
an array of fields, associations and optional fields.
an array of fields associations and optional fields .
Array
key
see
None