caelum / restfulie

CRUD through HTTP is a good step forward to using resources and becoming RESTful. Another step further into it is to make use of hypermedia-based services and the Restfulie gem allows you to do it very quickly.
Other
393 stars 43 forks source link

refresh resource is not working #47

Open guilhermesilveira opened 13 years ago

guilhermesilveira commented 13 years ago

Any Link collection (Links class) should have a method called refresh, which is a shortcut for .self.get.

abstractj commented 13 years ago

Got it :D

abstractj commented 13 years ago

Hi Gui, explain more about to me. You're talking to make this implementation in medie, or Link class that call medie like module?

guilhermesilveira commented 13 years ago

There is a class called Links. If you get a resource such as:

response.resource

You can invoke its links method and receives this object:

links = response.resources.links

So you can follow a link called self:

links.self.get

This issue requests a new method which is the equivalent as the above one (.self.get):

links.refresh

abstractj commented 13 years ago

Perfect, time to write some specs and implement. Thank u