Skip to content

Add an update! method on HAL link collection #145

Description

@chussenot

If i use representer with HAL links, i've got error because update! method is not set on LinkColection class

      def represent_collection(collection, *args)
        representer, dummy, options = parse_arguments({}, *args)
        decorator = representer.new(dummy)
        collection.map do |item|
          decorator.update!(item)
          decorator.to_hash(options)
        end
      end

So how to implement this ?

class Roar::Hypermedia::LinkCollection
  def update!(arr)
    # ... Implement here
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions