app/views/api_keys/_form.html.erb
<%= semantic_form_for [@referential, @api_key] do |form| %>
<%= form.inputs do %>
<%= form.input :name %>
<% unless @api_key.new_record? %>
<%= form.input :token, :input_html => { :readonly => true } %>
<% end %>
<% end %>
<%= form.actions do %>
<%= form.action :submit, :as => :button %>
<%= form.action :cancel, :as => :link %>
<% end %>
<% end %>