- flash[:group] = :general if flash[:group].blank? - if flash[:group] == group - [:notice, :warning, :error, :info].each do |flash_type| - color = nil - color = "success" if flash_type == :notice - color = "danger" if flash_type == :error - color = "info" if flash_type == :info - color = "warning" if flash_type == :warning - if flash[flash_type] %div{ class: (color ? "alert alert-#{color}" : "alert") } = flash[flash_type] - resource = nil unless resource - if resource && resource.errors.any? .alert.alert-danger - if resource.errors.any? %ul - resource.errors.full_messages.each do |msg| %li = msg