Hi all,
I’m working on a Rails application. In this application I retrieve a
list of
‘brands’ using a method somewhere defined in my controller:
private
def get_brands
@brands = Product.find_by_sql(“select distinct brand from
products”);
end
However, I display this information in a listbox in the template for my
controller.
This means @brands should be available on each request.
In Java I would accomplish this by putting the @brands reference on the
session scope.
What is an effective way to do this in Ruby?
Regards,
Harm