Permalink
Browse files

Adding image handling.

  • Loading branch information...
1 parent 70f74e6 commit e565ecae492def9ed8cd229ce743504c984f7dce itp student committed Sep 26, 2012
Showing with 7 additions and 2 deletions.
  1. BIN .DS_Store
  2. +1 −1 views/cars.erb
  3. +1 −1 views/races.erb
  4. +3 −0 views/racings.erb
  5. +2 −0 views/single_car.erb
View
BIN .DS_Store
Binary file not shown.
View
@@ -3,7 +3,7 @@
<h2><%= car.carname %></h2>
<h3>by <%= car.name %></h3>
-<a href="/cars/<%= car.rfid %>"><img src="/<%= car.rfid %>.jpg" width= "300"></a>
+<a href="cars/<%= "%010d" % car.rfid %>"><img src="http://192.168.23.2/~itpstudent/images/Cars/<%= "%010d" % car.rfid %>.jpg" width= "300"></a>
<% end %>
View
@@ -3,7 +3,7 @@
<br>
<% race.racings.all(:order=>[:duration.asc]).each do |racing| %>
<%= racing.car.carname %></br>
-<a href="/cars/<%= racing.car.rfid %>"><img src = "/<%= racing.car.rfid %>.jpg" width=100></a>
+<a href="/cars/<%= racing.car.rfid %>"><img src="http://192.168.23.2/~itpstudent/images/Cars/<%= "%010d" % racing.car.rfid %>.jpg" style="float: left;" width= "300"></a>
<br>
<h4>Time: <%= millisToTime(racing.duration) %>
<br>
View
@@ -1,8 +1,10 @@
<% count = 1 %>
<% @racings.each do |racing| %>
+<div style="width: 100%;">
<h1>
<%= count.to_s() + ". " %>
</h1>
+<a href="http://192.168.23.2/~itpstudent/images/Cars/<%= "%010d" % racing.car.rfid %>.jpg"><img src="http://192.168.23.2/~itpstudent/images/Cars/<%= "%010d" % racing.car.rfid %>.jpg" style="float: left;" width= "300"></a>
<% count = count + 1 %>
<h2>
<%= racing.car.carname %>
@@ -13,4 +15,5 @@ by <%= racing.car.name %>
<br>
during race: <%= racing.race.id %>
<br>
+</div>
<% end %>
View
@@ -1,7 +1,9 @@
<h1><%= @this_car.carname %></h1>
+
<br>
<h3>by <%= @this_car.name %></h3>
+<img src="http://192.168.23.2/~itpstudent/images/Cars/<%= "%010d" % @this_car.rfid %>.jpg" style="float: left;" width= "300">
<br>
<br>
<h3>Races</h3>

0 comments on commit e565eca

Please sign in to comment.