Skip to content

Commit

Permalink
Merge pull request #1008 from nishanthvijayan/remove-unused-helpers
Browse files Browse the repository at this point in the history
Remove unused helper methods
  • Loading branch information
hennevogel committed May 23, 2016
2 parents 0fd48f1 + 6eda97e commit d6a8680
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ def devise_mapping
@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'
Expand All @@ -49,10 +43,6 @@ def event_progress_color(progress)
end
end

def format_role(role)
role.parameterize.underscore
end

def target_progress_color(progress)
progress = progress.to_i
result =
Expand Down Expand Up @@ -143,22 +133,6 @@ def active_nav_li(link)
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
Expand All @@ -174,10 +148,6 @@ def show_time(length)
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
Expand Down Expand Up @@ -303,14 +273,6 @@ def sign_in_path
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
Expand Down

0 comments on commit d6a8680

Please sign in to comment.