<h1>Editing photo's meta-data</h1>

<% form_for(@photo) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :description %><br />
    <%= f.text_field :description %>
  </p>
  <p>
  <% @actor = Actor.find(@photo.actor_id) %>	
  <b>Actor:</b>
       <%=h @actor.full_name %>
  </p>
  <p>
    <%= f.label :name, "Photo name" %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @photo %> |
<%= link_to 'Listing', photos_path %>