Module: ApplicationHelper
- Defined in:
- lib/generators/happy_seed/bootstrap/templates/app/helpers/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_class(level) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/generators/happy_seed/bootstrap/templates/app/helpers/application_helper.rb', line 2 def flash_class(level) case level.to_sym when :notice then "alert-info" when :success then "alert-success" when :alert then "alert-warning" when :error then "alert-danger" else "alert-danger" end end |
#page_title ⇒ Object
12 13 14 |
# File 'lib/generators/happy_seed/bootstrap/templates/app/helpers/application_helper.rb', line 12 def page_title @title || controller_name.gsub( /Controller/, "" ).humanize end |