Permalink
Browse files

Added a custom hash to the readme, should be compatable with rb 1.8.7…

… on.

Z
  • Loading branch information...
1 parent c919c2f commit f9e7ecd8c456c4a05db82ef822440afcebf0abcd @ZachBeta ZachBeta committed Mar 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 README.textile
View
@@ -329,6 +329,7 @@ Many inputs provide a collection of options to choose from (like @:select@, @:ra
f.input :author, :as => :radio, :collection => { @justin.name => @justin.id, @kate.name => @kate.id }
f.input :author, :as => :radio, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
f.input :admin, :as => :radio, :collection => ["Yes!", "No"]
+ f.input :book_id, :as => :select, :collection => Hash[Book.all.map{|b| [b.name,b.id]}]
</pre>

0 comments on commit f9e7ecd

Please sign in to comment.