Changes to views/index.erb

Changes to the template file are a matter of descriptive text and variable references. Here's the old version:

<html><head>
  <title>Environment Variables</title>
</head><body>
  <h1>Environment Variables</h2>
  <table border="1" cellpadding="5">
    <tr>
      <td>Name</td>
      <td>Value</td>
    </tr>
    <% @env.each do |name, value| %>
      <% value = value[0..19] + "..." if value.length > 20 %>
      <tr>
        <td><%= name %></td>
        <td><%= value %></td>
      </tr>
    <% end %>
  </table>
</body>
</html>

And the new version is as follows:

<html><head>
  <title>Tasks</title>
</head><body>
  <h1>Tasks</h1>
  <table border="1" cellpadding="5">
    <tr>
      <td>Name</td>
      <td>Completed</td>
    </tr>
    <% @rows.each do |row| %>
      <tr>
        <td><%= row['Name'] %></td>
        <td><%= row['Completed'] %></td>
      </tr>
    <% end %>
  </table>
</body></html>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.74.231