Module: Tuttle::ApplicationHelper
- Defined in:
- app/helpers/tuttle/application_helper.rb
Instance Method Summary collapse
- #main_app_root_path ⇒ Object
- #main_app_root_url ⇒ Object
- #truth_label(is_true, true_label = 'true'.freeze, false_label = 'false'.freeze) ⇒ Object
- #tuttle_redacted(enumarator) ⇒ Object
Instance Method Details
#main_app_root_path ⇒ Object
14 15 16 |
# File 'app/helpers/tuttle/application_helper.rb', line 14 def main_app_root_path main_app.respond_to?(:root_path) ? main_app.root_path : "/" end |
#main_app_root_url ⇒ Object
18 19 20 |
# File 'app/helpers/tuttle/application_helper.rb', line 18 def main_app_root_url main_app.respond_to?(:root_url) ? main_app.root_url : "/" end |
#truth_label(is_true, true_label = 'true'.freeze, false_label = 'false'.freeze) ⇒ Object
4 5 6 |
# File 'app/helpers/tuttle/application_helper.rb', line 4 def truth_label(is_true, true_label='true'.freeze, false_label='false'.freeze) "<span class='label label-#{ is_true ? 'success'.freeze : 'danger'.freeze}'>#{ is_true ? true_label : false_label}</span>".html_safe end |
#tuttle_redacted(enumarator) ⇒ Object
8 9 10 11 12 |
# File 'app/helpers/tuttle/application_helper.rb', line 8 def tuttle_redacted(enumarator) enumarator.collect do |key, value| yield key, redact_by_key(key, value) end end |