aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2013-12-25 14:49:46 +0100
committerHarald Eilertsen <haraldei@anduin.net>2013-12-25 14:49:46 +0100
commitbad5fbd942de1d3a059587f595cac2aa50407b15 (patch)
tree91cd00c0bfc1420795cff6ec83de574b3adc8180 /app/views
parentb72598485ace03615a1c39f6a8720c6fe6cfa458 (diff)
downloadhmnoweb-bad5fbd942de1d3a059587f595cac2aa50407b15.tar.gz
hmnoweb-bad5fbd942de1d3a059587f595cac2aa50407b15.tar.bz2
hmnoweb-bad5fbd942de1d3a059587f595cac2aa50407b15.zip
Refactor filtering of sidebar modules to helper.
Also strip out modules with empty bodies.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/common/_left_sidebar.html.erb2
-rw-r--r--app/views/common/_right_sidebar.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/common/_left_sidebar.html.erb b/app/views/common/_left_sidebar.html.erb
index 3cdbe0c..9f5a40f 100644
--- a/app/views/common/_left_sidebar.html.erb
+++ b/app/views/common/_left_sidebar.html.erb
@@ -1,3 +1,3 @@
<div id="left_sidebar">
- <%= render_sidebar_modules @sidebar_modules.select {|m| m.position == 1} %>
+ <%= render_sidebar_modules @sidebar_modules, :position => 1 %>
</div>
diff --git a/app/views/common/_right_sidebar.html.erb b/app/views/common/_right_sidebar.html.erb
index 082e4f1..e90e858 100644
--- a/app/views/common/_right_sidebar.html.erb
+++ b/app/views/common/_right_sidebar.html.erb
@@ -1,3 +1,3 @@
<div id="right_sidebar">
- <%= render_sidebar_modules @sidebar_modules.select {|m| m.position == 2} %>
+ <%= render_sidebar_modules @sidebar_modules, :position => 2 %>
</div>