Merge pull request #1008 from nishanthvijayan/remove-unused-helpers

Remove unused helper methods
This commit is contained in:
Henne Vogelsang 2016-05-23 11:52:22 +02:00
commit d6a8680d5d

View file

@ -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