-
Notifications
You must be signed in to change notification settings - Fork 28
java_link
josedonizetti edited this page Feb 10, 2011
·
1 revision
Restfulie uses tokamak to render links in media type representations. All documentation and samples from tokamak can be used in your tokamak 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:
collection(@items, :root => "items") do |items|
items.link "self", items_url
items.members do |m, item|
m.link :self, item_url(item)
m.values { |values|
values.name item.name
}
end
end