search for: mylookup

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

Did you mean: lookup
2006 May 03
6
Versioning the contents of a table as a set
....c3 represent criteria, r represents result) for each set of criteria: r c1 c2 c3 ------------------ 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 This allows me to select a result as follows myresult = mylookup.find(:conditions => ["c1 = ?", "c2 = ?", "c3 = ?", a, b, c]).r In this example, r is true when c1 is true and c3 is false or when c1 is true and c2 and c3 are true. This example is extremely simplified in the hopes of conveying the concept. The actual criteria tab...