-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pikesley
committed
Feb 20, 2016
1 parent
e00aced
commit 226338c
Showing
5 changed files
with
38 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
<tr> | ||
<td> | ||
<%= link_to passed_value.datetime.strftime('%H:%M'), | ||
send("edit_#{passed_value.class.name.underscore}_path".to_sym, passed_value) %> | ||
<!-- this resolves to e.g. edit_medication_event_path --> | ||
<%= link_to value.datetime.strftime('%H:%M'), | ||
send(edit_path(value), value), | ||
title: 'Edit this metric' | ||
%> | ||
</td> | ||
|
||
<% fields.each do |field| %> | ||
<td class='<%= "#{passed_value.class.name.underscore.gsub('_', '-')}-#{field}" %>'> | ||
<%= passed_value.send(field) %> | ||
<td> | ||
<%= class_name(value).short_name %> | ||
</td> | ||
<% count = 0 %> | ||
<% class_name(value).fields.each do |field| %> | ||
<td class='<%= class_for_table_cell value, field %>'> | ||
<% if value.class.units[:applies_to] == field.to_sym %> | ||
<div class='value' | ||
data-toggle='tooltip' | ||
data-placement='top' | ||
title='<%= value.send(field) %> <%= value.class.units[:full] %>'> | ||
<span class='number'><%= value.send(field) %></span> | ||
<span class='units'><%= value.class.units[:short] %></span> | ||
</div> | ||
<% else %> | ||
<%= value.send(field) %> | ||
<% end %> | ||
</td> | ||
<% count += 1 %> | ||
<% end %> | ||
<% if @widest %> | ||
<% (@widest - count).times do %> | ||
<td class='filler'></td> | ||
<% end %> | ||
<% end %> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,2 @@ | ||
require 'rails_helper' | ||
|
||
# Specs in this file have access to a helper object that includes | ||
# the GlycatedHaemoglobinsHelper. For example: | ||
# | ||
# describe GlycatedHaemoglobinsHelper do | ||
# describe "string concat" do | ||
# it "concats two strings with spaces" do | ||
# expect(helper.concat_strings("this","that")).to eq("this that") | ||
# end | ||
# end | ||
# end | ||
RSpec.describe GlycatedHaemoglobinsHelper, type: :helper do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
describe GlycatedHaemoglobinsHelper, type: :helper do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters