From 6eda97e10c079c7ec5e3a7a4699ac9eea46c2007 Mon Sep 17 00:00:00 2001 From: Nishanth Vijayan Date: Thu, 28 Apr 2016 12:17:41 +0530 Subject: [PATCH] Remove unused helper methods --- app/helpers/application_helper.rb | 38 ------------------------------- 1 file changed, 38 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e04b902d..794c36c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -17,12 +17,6 @@ module ApplicationHelper @devise_mapping ||= Devise.mappings[:user] end - def pluralize_without_count(count, noun, text = nil) - if count != 0 - count == 1 ? "#{noun}#{text}" : "#{noun.pluralize}#{text}" - end - end - def event_status_icon(event) case event.state when 'new' @@ -49,10 +43,6 @@ module ApplicationHelper end end - def format_role(role) - role.parameterize.underscore - end - def target_progress_color(progress) progress = progress.to_i result = @@ -143,22 +133,6 @@ module ApplicationHelper end end - def getdatetime(registration, field) - if registration.send(field.to_sym).kind_of?(String) - DateTime.parse(registration.send(field.to_sym)).strftime('%d %b %H:%M') if registration.send(field.to_sym) - else - registration.send(field.to_sym).strftime('%d %b %H:%M') if registration.send(field.to_sym) - end - end - - def getdate(var) - if var.kind_of?(String) - DateTime.parse(var).strftime('%a, %d %b') - else - var.strftime('%a, %d %b') - end - end - def show_time(length) h = length / 60 min = length - h * 60 @@ -174,10 +148,6 @@ module ApplicationHelper end end - def pre_registered(event) - @conference.program.events.joins(:registrations).where('events.id = ?', event.id) - end - def add_association_link(association_name, form_builder, div_class, html_options = {}) link_to_add_association 'Add ' + association_name.to_s.singularize, form_builder, div_class, html_options.merge(class: 'assoc btn btn-success') end @@ -303,14 +273,6 @@ module ApplicationHelper end end - def sign_up_path - if ENV['OSEM_ICHAIN_ENABLED'] == 'true' - new_user_ichain_registration_path - else - new_user_registration_path - end - end - def unread_notifications(user) Comment.accessible_by(current_ability).find_since_last_login(user) end