From 595b16a783b7a99cadbf7cd61086ead32c6298a9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 23 Dec 2013 20:25:47 +0100 Subject: Add sidebar_position field to blog categories. --- app/helpers/application_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..3cce866 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,12 @@ module ApplicationHelper + def make_choice_from(array) + value = 0 + choices = [] + array.each do |item| + choices << [item, value] + value += 1 + end + + choices + end end -- cgit v1.2.3