Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an update! method on HAL link collection #145

Open
chussenot opened this issue May 28, 2015 · 1 comment
Open

Add an update! method on HAL link collection #145

chussenot opened this issue May 28, 2015 · 1 comment

Comments

@chussenot
Copy link

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

@apotonick
Copy link
Member

When exactly does that happen? Can you paste the code that uses Roar and the representer, pleeeeease?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants