From 37fb336af7dfed4a3ca32fd1b7cb5e780f3f80dc Mon Sep 17 00:00:00 2001 From: hitman Date: Tue, 7 Mar 2017 16:06:22 +0530 Subject: [PATCH] remove bootstrap_class_for helper function and related usage --- app/helpers/application_helper.rb | 15 --------------- app/views/layouts/_messages.html.haml | 10 +--------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 20c8eadb..43f6fef0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -133,21 +133,6 @@ module ApplicationHelper result end - def bootstrap_class_for(flash_type) - case flash_type - when 'success' - 'alert-success' - when 'error' - 'alert-danger' - when 'alert' - 'alert-warning' - when 'notice' - 'alert-info' - else - 'alert-warning' - end - end - def label_for(event_state) result = '' case event_state diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index 406087d7..c953d224 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -6,12 +6,4 @@ %h2 JavaScript is not enabled %p - OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue. -- flash.each do |type, message| - .row - .col-md-12 - %div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"} - .button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"} - × - %p - = message \ No newline at end of file + OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue. \ No newline at end of file