Module: Settr::SettingsHelper
- Defined in:
- app/helpers/settr/settings_helper.rb
Instance Method Summary collapse
Instance Method Details
#hash_depth(hash) ⇒ Object
14 15 16 17 |
# File 'app/helpers/settr/settings_helper.rb', line 14 def hash_depth(hash) hashes = hash.values.select{|h| h.is_a?(Hash)} hashes.present? ? hashes.map{|h| hash_depth(h)}.max + 1 : 1 end |
#header(content) ⇒ Object
3 4 5 6 |
# File 'app/helpers/settr/settings_helper.rb', line 3 def header(content) = Settr.header_class ? {:class => Settr.header_class} : {} content_tag(Settr.header_tag.to_sym, content, ) end |
#link(body, url, html_options = {}) ⇒ Object
8 9 10 11 12 |
# File 'app/helpers/settr/settings_helper.rb', line 8 def link(body, url, = {}) = Settr.link_class ? {:class => Settr.link_class} : {} .update() link_to(body, url, ) end |