Module: I18nDashboard::ApplicationHelper
- Defined in:
- app/helpers/i18n_dashboard/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#humanize_key(key) ⇒ Object
14 15 16 |
# File 'app/helpers/i18n_dashboard/application_helper.rb', line 14 def humanize_key(key) key.split('.').last.gsub('_', ' ').gsub(/\b('?[a-z])/) { $1.capitalize } end |
#show_title? ⇒ Boolean
10 11 12 |
# File 'app/helpers/i18n_dashboard/application_helper.rb', line 10 def show_title? @show_title end |
#title(page_title, show_title = true) ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/i18n_dashboard/application_helper.rb', line 3 def title(page_title, show_title = true) @show_title = show_title if @show_title content_for(:title) { h(page_title.to_s) } end end |