use render plugin to load erb html views
parent
239d36ad85
commit
b85a577ec2
5
app.rb
5
app.rb
|
|
@ -3,9 +3,10 @@ require 'securerandom'
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
||||||
class App < Roda
|
class App < Roda
|
||||||
|
plugin :render, escape: true
|
||||||
route do |r|
|
route do |r|
|
||||||
r.root do
|
r.root do
|
||||||
"this is the root"
|
view :home
|
||||||
end
|
end
|
||||||
|
|
||||||
r.get String do | url_code |
|
r.get String do | url_code |
|
||||||
|
|
@ -13,7 +14,7 @@ class App < Roda
|
||||||
end
|
end
|
||||||
|
|
||||||
r.post "create" do
|
r.post "create" do
|
||||||
|
view :create
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue