MorningPeak/app/helpers/tickets_helper.rb
2015-06-19 21:35:48 +02:00

17 lines
334 B
Ruby

module TicketsHelper
def link_to_creator ticket
if ticket.creator_type == "User"
return link_to ticket.creator_name, ticket.creator.client
else
return ticket.creator_name
end
end
def admin_tickets_unview_count
return if not admin_signed_in?
return current_admin.tickets_unview.count
end
end