Displaying 1 result from an estimated 1 matches for "get_brands".
2005 Dec 15
3
session scope?
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...