module ApplicationHelper

Public Instance Methods

flash_class(level) click to toggle source
# File lib/generators/happy_seed/bootstrap/templates/app/helpers/application_helper.rb, line 2
def flash_class(level)
  case level.to_sym
    # allow either standard rails flash category symbols...
    when :notice then "info"
    when :success then "success"
    when :alert then "warning"
    when :error then "danger"
    # ... or bootstrap class symbols
    when :info then "info"
    when :warning then "warning"
    when :danger then "danger"
    # and default to being alarming
    else "danger"
  end
end
page_title() click to toggle source
# File lib/generators/happy_seed/bootstrap/templates/app/helpers/application_helper.rb, line 18
def page_title
  @title || controller_name.gsub( /Controller/, "" ).humanize
end