<h1><%= current_user.name %></h1>

<div class="skills">
  <% current_user.skills.each do |skill| %>
    <p><%= skill.title %> - <%= skill.time_remaining %> - <%= link_to 'Refresh', refresh_path(skill) %> - 
    Current streak: <%= skill.current_streak %></p>
  <% end %>
</div>

<%= form_for @new_skill do |f| %>
  <%= f.text_field :title %>
  <%= f.submit "add" %>
<% end %>

<script>
  addSkill();
</script>
<h1><%= current_user.name %></h1>

<div class="skills">
  <% current_user.skills.each do |skill| %>
    <%= skill.title + " - " + "Current streak: " + skill.current_streak.to_s + " - " +
    "Time remaining " %>
    <%= content_tag(:span, :"data-countdown" => skill.expiration_date) {} %>
    <%= link_to('Refresh', refresh_path(skill)) %>
    <br>
  <% end %>
</div>

<%= form_for @new_skill do |f| %>
  <%= f.text_field :title %>
  <%= f.submit "add" %>
<% end %>

<script>
  addSkill();
</script>
Add data attribute to span for jquery countdown
Add data attribute to span for jquery countdown
