I got my create, update and show forms working for a single entity. One of the fields is an image file that I am entering using the multipart attribute in the form. My question is how do I show the image attribute in the show form.
<tr>
<th>Photo</th>
<td><%= @teacher.photo %></td>
</tr>
The photo attribute is of binary type in the table definition.
create_table :teachers do |t|
t.string :firstname, null: false
t.string :lastname, null: false
t.string :email, null: false
t.string :cellphone
t.string :username, null: false
t.string :password_digest, null: false
t.string :addr_streetno
t.integer :addr_aptno
t.string :addr_city
t.string :addr_state
t.integer :addr_zip
t.binary :photo, :limit => 0.5.megabyte
t.timestamps
end