I'm not sure if I'm doing this correctly.. I'm using the diff
from Github. Please bear with me, and let me know if I should
submit this differently?
@@ -207,6 +207,11 @@ module ActionView 0
# options_from_collection_for_select(@project.people, "id", "name")
0
# <option value="#{person.id}">#{person.name}</option>
0
#
0 + # Example (call, result). When specifying +selected+ using
an ID be sure to pass an Integer rather than a string: 0 + #
options_from_collection_for_select(@project.people, "id", "name",
some_id.to_i) 0 + #
#{person.name} 0 + # #{person.name} #assume some_id was a string
value of this person.id 0 + # 0
# NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
0
def options_from_collection_for_select(collection, value_method, text_method, selected = nil)
0
options = collection.map do |element|