How to have a drop down field in a rails form?

You can take a look at the Rails documentation . Anyways , in your form :

  <%= f.collection_select :provider_id, Provider.order(:name),:id,:name, include_blank: true %>

As you can guess , you should predefine email-providers in another model –Provider , to have where to select them from .

Or for custom options

<%= f.select :desired_attribute, [option1, option2]%>

How to have a drop down