mishina2228/oanda-api-rails

View on GitHub
app/views/candle_information/index.html.erb

Summary

Maintainability
Test Coverage
<% title = t('helpers.title.list', models: CandleInformation.model_name.human.pluralize(I18n.locale)) %>
<% content_for(:html_title) {title} %>

<h1>
  <%= title %>
</h1>

<table class='table table-bordered table-hover table-striped'>
  <caption><%= t('text.candle_information.count') %></caption>

  <tbody>
  <tr>
    <th class="w-40"><%= tag.span CandleInformation.human_attribute_name :usd_jpy_m1_count %></th>
    <td><%= tag.span @candle_information.usd_jpy_m1_count.to_fs(:delimited) %></td>
  </tr>
  <tr>
    <th><%= tag.span CandleInformation.human_attribute_name :eur_jpy_m1_count %></th>
    <td><%= tag.span @candle_information.eur_jpy_m1_count.to_fs(:delimited) %></td>
  </tr>
  <tr>
    <th><%= tag.span CandleInformation.human_attribute_name :gbp_jpy_m1_count %></th>
    <td><%= tag.span @candle_information.gbp_jpy_m1_count.to_fs(:delimited) %></td>
  </tr>
  </tbody>
</table>

<table class='table table-bordered table-hover table-striped'>
  <caption><%= t('text.candle_information.latest_time') %></caption>

  <tbody>
  <tr>
    <th class="w-40"><%= tag.span CandleInformation.human_attribute_name :usd_jpy_m1_latest %></th>
    <td><%= tag.span candle_latest_time @candle_information.usd_jpy_m1_latest %></td>
  </tr>
  <tr>
    <th><%= tag.span CandleInformation.human_attribute_name :eur_jpy_m1_latest %></th>
    <td><%= tag.span candle_latest_time @candle_information.eur_jpy_m1_latest %></td>
  </tr>
  <tr>
    <th><%= tag.span CandleInformation.human_attribute_name :gbp_jpy_m1_latest %></th>
    <td><%= tag.span candle_latest_time @candle_information.gbp_jpy_m1_latest %></td>
  </tr>
  </tbody>
</table>