From fb5ea9059647ca8ee5cea568f47551da547b70f7 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 26 Jun 2012 18:06:28 +0200 Subject: stress three step layout with a little helper --- http-srp.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'http-srp.rb') diff --git a/http-srp.rb b/http-srp.rb index ab1a4f4..c0c9360 100644 --- a/http-srp.rb +++ b/http-srp.rb @@ -53,3 +53,16 @@ post '/login' do @user.login!(params) redirect '/' end + +helpers do + def button_link(action, options = {}) + action = action.to_s + label = action.capitalize + klass = "btn btn-large" + if options.delete(:primary) + klass += " btn-primary" + label += " now..." + end + %Q(#{label}) + end +end -- cgit v1.2.3