aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2013-12-23 20:25:47 +0100
committerHarald Eilertsen <haraldei@anduin.net>2013-12-23 20:25:47 +0100
commit595b16a783b7a99cadbf7cd61086ead32c6298a9 (patch)
treefcb063b0a4eaf8d138706c9b067d30de00b272bc /app/helpers
parent8b8e9cd1224f0f573017bc236d76c0f8ccd657ee (diff)
downloadhmnoweb-595b16a783b7a99cadbf7cd61086ead32c6298a9.tar.gz
hmnoweb-595b16a783b7a99cadbf7cd61086ead32c6298a9.tar.bz2
hmnoweb-595b16a783b7a99cadbf7cd61086ead32c6298a9.zip
Add sidebar_position field to blog categories.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb10
1 files changed, 10 insertions, 0 deletions
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