Simple-Form input :collection does not highlight field when error is raised

I have a problem with simple form it doesn’t highlight field where error is raised.

search.rb

class Search < ActiveRecord::Base    
validates_presence_of :brand

_form.html.erb

<%= f.input :brand_id, collection: Brand.all.order(:name), prompt: 'Select brand' %>

enter image description here

I want brand field be hihlighted the same way keywords field is.
I’ve checked if validates_presence_of brand raise the error and it dose, but doesn’t highlight the field.


Source: ruby

Leave a Reply