You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
josedonizetti edited this page Feb 10, 2011
·
1 revision
Rendering links with tokamak
Restfulie uses tokamak to render links in media type representations. All documentation and samples from tokamak can be used in your tokamak templates.
Sample
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