From 1db292f75d0ae4b51c60605a5d0320cc5c5fe21f Mon Sep 17 00:00:00 2001 From: Jeff Smick Date: Sat, 28 Feb 2009 08:33:59 +0800 Subject: [PATCH] update README to reflect association attribute changes Signed-off-by: Justin French --- README.textile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.textile b/README.textile index 723df8d7f..38e0186ad 100644 --- a/README.textile +++ b/README.textile @@ -12,9 +12,9 @@ One day, I finally had enough, so I opened up my text editor, and wrote a DSL fo <% form.inputs :name => "Basic" do %> <%= form.input :title %> <%= form.input :body %> - <%= form.input :section_id %> - <%= form.input :publication_state_id, :as => :radio %> - <%= form.input :author_id, :as => :select %> + <%= form.input :section %> + <%= form.input :publication_state, :as => :radio %> + <%= form.input :author %> <%= form.input :allow_comments, :label => "Allow commenting on this article" %> <% end %> @@ -55,8 +55,8 @@ h2. Opinions h2. The Available Inputs -* :select (a select menu for belongs_to associations) - default for columns ending in '_id' -* :radio (a set of radio inputs for belongs_to associations) - alternative for columns ending in '_id' +* :select (a select menu for belongs_to associations) - default for association attributes (belongs_to, has_many, has_and_belongs_to_many) +* :radio (a set of radio inputs for belongs_to associations) - alternative association attributes (belongs_to) * :password (a password input) - default for :string column types with 'password' in the method name * :text (a textarea) - default for :text column types * :date (a date select) - default for :date column types @@ -137,7 +137,7 @@ The smallest example: <% form.inputs do %> <%= form.input :title %> <%= form.input :body %> - <%= form.input :section_id, :as => :radio %> + <%= form.input :section, :as => :radio %> <% end %> <% form.buttons do %> <%= form.commit_button %> @@ -193,7 +193,7 @@ If you're happy to accept the default input types and labels, there's a shorthan
   <% semantic_form_for @user do |form| %>
-    <%= form.inputs :title, :body, :section_id, :created_at %>
+    <%= form.inputs :title, :body, :section, :created_at %>
     <%= form.buttons :commit %>
   <% end %>