Blank Row in Select_Tag – Ruby on Rails

Hey everyone,

Just a quick post on how to include a blank row or prompt value when using a select_tag in rails:

  2. #Prompt
  3. <select_tag "Animals", animals_as_options, :prompt => "Please select an animal" />
  5. #Blank option
  6. <select_tag "Animals", animals_as_options, :include_blank => true />

Let me know if you have any issues.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.