From eb915702dc3a2cb1dc15668187a8f009e0824b41 Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 11 Nov 2007 05:05:07 +0000 Subject: [PATCH] adding new helpers git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@14 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/helpers/beers_helper.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/helpers/beers_helper.rb diff --git a/app/helpers/beers_helper.rb b/app/helpers/beers_helper.rb new file mode 100644 index 0000000..486ba97 --- /dev/null +++ b/app/helpers/beers_helper.rb @@ -0,0 +1,9 @@ +module BeersHelper + def new_beer_link + link_to "Beer Me!", new_beer_path, { :title => 'Create a new beer' } + end + + def abv(beer) + number_to_percentage(beer.abv, { :precision => 1 }) + end +end