collection_select(オブジェクト名, メソッド名, 要素の配列, value属性の項目, テキストの項目 [, オプション or HTML属性 or イベント属性])
f.collection_select(メソッド名, オブジェクトの配列, value属性の項目, テキストの項目 [, オプション or HTML属性 or イベント属性])
collection_select(:page, :name, @categories, :id, :name)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
collection_select(:page, :name, @categories, :id, :name, nil, prompt: "選択してください")
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
collection_select(:page, :name, @categories, :id, :name, include_blank: true)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
collection_select(:page, :name, @categories, :id, :name, selected: 2)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2" selected="selected">Rubyの基礎知識</option>
# </select>
f.collection_select(:name, @categories, :id, :name)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
f.collection_select(:name, @categories, :id, :name, nil, prompt: "選択してください")
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
f.collection_select(:name, @categories, :id, :name, include_blank: true)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2">Rubyの基礎知識</option>
# </select>
f.collection_select(:name, @categories, :id, :name, selected: 2)
# <select id="page_name" name="page[name]"><option value="1">Railsの基礎知識</option>
# <option value="2" selected="selected">Rubyの基礎知識</option>
# </select>