3 ms·
The same in Cuba (http://cuba.is http://cuba.is): Cuba.define do on "blog/:id" do |id| blog = Blog.get(id) on(get) { res.write blog
by soveran 15y ago
The same in Cuba (http://cuba.is http://cuba.is):
Cuba.define do
on "blog/:id" do |id|
blog = Blog.get(id)
on(get) { res.write blog }
on(put) { blog.update(req.params); res.write :ok }
end
end
- seanp2k2 15y agoThese all seem like good ideas in their own way. I say "it's great that we have all these useful ways of doing similar things!". Choose whatever best fits your application. I really like that this type of stuff is catching on over Rails.