diff --git a/app.rb b/app.rb index 736d0dc..9321f03 100644 --- a/app.rb +++ b/app.rb @@ -20,7 +20,7 @@ class App < Roda r.post "create" do url = r.params['url'] if nil == links.filter(:url => url).first - code = SecureRandom.urlsafe_base64 5 + code = SecureRandom.urlsafe_base64 4 links.insert(url: url, code: code) end @new_link = 'http://' + request.env['HTTP_HOST'] + '/' + links.filter(:url => url).first[:code] diff --git a/views/layout.erb b/views/layout.erb index 7f6853c..bc24c5c 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -3,8 +3,10 @@ <%= @page_title || "URL Shortener" %> - -

URL Shortener

- <%== yield %> + +
+

URL Shortener

+ <%== yield %> +