I want a collection_select that has 1 - 31 in it for the days in the month. Is there an easy way to create this loop to populate my 开发者_运维知识库collection_select?
collection_select :aaa, :bbb, (1..31).to_a, :to_s, :to_s
Update:
Actually, all you need is:
collection_select :aaa, :bbb, 1..31, :to_s, :to_s
精彩评论