<%= form_for(@pm) do |f| %>
  <% if @pm.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:</h2>

      <ul>
        <% @pm.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :to_user %>
    <%= text_field_tag 'pm[to_user][name]' %>
  </div>
  <div class="field">
    <%= f.label :content %>
    <%= render 'topics/editor_lite', :name => "pm[content]" %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
<%= link_to 'Back', pms_path %>
