<%= form_for @directory do |f| %>
<% if @directory.new_record? %> <%= f.hidden_field :parent_id %> <% end %>

Parent: <%= @directory.parent.path %>

<%= f.label :name %>
<%= f.text_field :name %>

<%= f.label :hidden %>
<%= f.check_box :hidden %>

<%= f.submit %>

<% end %>