Ruby on Rails - creating a search form in ruby on rails - ruby on rails tutorial - rails guides - rails tutorial - ruby rails
To create a search form, enter the given below code
- form_tag: This is the default helper for creating a form. It's first parameter, /search is the action and the second parameter specifies the HTTP method. For search forms, it is important to always use the method get
- label_tag: This helper creates an html <label> tag.
- text_field_tag: This will create an input element with type text
- submit_tag: This creates an input element with type submit