search for: stock_rul

Displaying 1 result from an estimated 1 matches for "stock_rul".

Did you mean: stock_r
2006 Mar 29
3
Loading records during class definition
I''ve created a look-up table in my database that currently has 4 rows. I want to access these as constants in the application because that''s effectively what they are. I tried this... class StockRuleLevel < ActiveRecord::Base has_many :stock_rules SITE = find(:first, :conditions => "type_code = ''site''").id MAKE = find(:first, :conditions => "type_code = ''make''").id MODEL = find(:first, :conditions => "type_code = ''model'...