module Bullet

def warnings

def warnings
  notification_collector.collection.inject({}) do |warnings, notification|
    warning_type = notification.class.to_s.split(':').last.tableize
    warnings[warning_type] ||= []
    warnings[warning_type] << notification
    warnings
  end
end