-
Notifications
You must be signed in to change notification settings - Fork 43
ruby_hypertemplate
guilhermesilveira edited this page Jun 1, 2011
·
1 revision
Restfulie uses hypertemplate to render links in media type representations. All documentation and samples from hypertemplate can be used in your templates.
The following example shows how to render a collection using tokamak, to generate a list of items and a link to both the collection and each one of the items:
products {
link "order", orders_url, "type" => "application/xml"
@products.each do |prod|
product {
link :self, product_url(prod)
id prod.id
name prod.name
price prod.price
}
end
}