search for: get_max_class2

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

2006 Apr 04
1
Added method to ActiveRecord Class
Hi, Let''s say: class Class2 << ActiveRecord belongs_to: class1 end class Class1 << ActiveRecord has_many :class2s def get_max_class2 ?how to get the max of class2 list ? end end I would like to know how I have to write the get_max_class2 method in order to have the max value of the class2 list ? I would like to call this method this way: class2_max = class1.get_max_class2 Any ideas ? Thanks a lot in advance Regard...