Slide 55
Slide 55 text
#
app/behaviors/render_ok.cru
require
'./my_middleware'
run
proc
{|env|
[200,
{'Content-‐Type'
=>
'text/plain'},
['OK']]
}
#
app/models/site.rb
class
Site
include
Circuit::Storage::Sites::MongoidStore::Site
has_one
:root,
:class_name
=>
"Node"
end
#
app/models/node.rb
class
Node
include
Circuit::Storage::Nodes::MongoidStore::Node
belongs_to
:site,
:inverse_of
=>
:root
end
34
Friday, February 8, 13