rails collection_select vs. select

collection_select is intended to be used when the list of items is an array of ActiveRecord objects. collection_select is built on the top of select so it’s a convenient method when you need to display a collection of objects and not an array of strings.

collection_select(:post, :author_id, Author.find(:all), :id, :name)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)