aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2014-02-20 20:36:51 +0900
committerRhenium <rhenium@rhe.jp>2014-02-20 20:36:51 +0900
commite0d3da8ccadc46099ad05e838b84d4fc06c995e9 (patch)
tree61447cc9da2d26b17fa5b895be786c20444968e3 /app/helpers/application_helper.rb
parent33689cbce02d01aa59aab7d2aaba9e7127aacd9f (diff)
downloadaclog-e0d3da8ccadc46099ad05e838b84d4fc06c995e9.tar.gz
apply rot's new web design
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3d5eedd..479c9c9 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -7,20 +7,12 @@ module ApplicationHelper
end
end
- def caption(text)
- content_for :caption do
- if text.is_a? Symbol
- content_for(text)
- else
- text
- end
+ def link_to_with_active(name, options = {}, html_options = {}, &block)
+ if current_page?(options)
+ html_options[:class] = (html_options[:class].to_s + " active").strip
end
- end
- def sidebar(name)
- content_for :sidebar do
- render "shared/sidebar/#{name}"
- end
+ link_to name, options, html_options, &block
end
# utf8, form