%= form_for(@order) do |f| %>
<% if @order.errors.any? %>
<%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:
<% @order.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= text_field_tag :notes %>
<%= text_field_tag :client %>
<%= f.submit %>
<% end %>
Simple form:
<%= simple_form_for(@order) do |f| %>
<% if @order.errors.any? %>
<%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:
<% @order.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= f.input :notes %>
<%#= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_orders_url, :items => 2, :minLength=>1, :afterSelect=>'after_select_client' %>
<%#= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_clients_url %>
<%= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_clients_url, :field_id=>false %>
<%= f.submit %>
<% end %>