I’m working on a Rails application. In this application I retrieve a
‘brands’ using a method somewhere defined in my controller:
@brands = Product.find_by_sql(“select distinct brand from
However, I display this information in a listbox in the template for my
This means @brands should be available on each request.
In Java I would accomplish this by putting the @brands reference on the
What is an effective way to do this in Ruby?