Sha256: 12a2ef3b8b92ccaf8150ddc2fc1eaace6c52a9e898f5e02b834180b4905b02c6
Contents?: true
Size: 493 Bytes
Versions: 6
Compression:
Stored size: 493 Bytes
Contents
require 'clearwater/component' # We use a Struct here because it's shorthand for a class that takes an argument # and gives us an accessor method with that name. Otherwise, it's identical to a # typical template; we just wanted to take an argument. ChildRoute = Struct.new(:name) do include Clearwater::Component def render div([ h2(name), p("This is the child route called #{name}"), div([ h3('Child content:'), outlet, ]), ]) end end
Version data entries
6 entries across 6 versions & 1 rubygems