select or select_tag

Which is the easiest to implement in a Rails app view when
pulling data from tables? select or select_tag?

Thank you,

Rachel S Nichol
Oracle Developer
Hargray Telephone Company

Positive Exchange of Control

****Hargray’s
mission: **** To envision
and deliver customer delight

I believe they’re fairly equivalent WRT populating them w/values.

I think the main distinction is whether you’re feeding the selected value into a form that builds a model object or not. If you’re in a form_for block,
then select is easier (e.g., it uses the context of the form builder to save you from having to worry about how the value gets serialized in the params hash). If you’re in any other kind of form, then select_tag may be necessary.