Sha256: 7bb2c6ce86dae7635560e0009d995a638c91e11012a2aafd7d60435eab5374ad
Contents?: true
Size: 565 Bytes
Versions: 2
Compression:
Stored size: 565 Bytes
Contents
module ApplicationHelper 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 def page_title @title || controller_name.gsub( /Controller/, "" ).humanize end end
Version data entries
2 entries across 2 versions & 1 rubygems