Displaying 1 result from an estimated 1 matches for "lessonplan".
Did you mean:
lesson_plan
2006 Nov 04
0
Using <=> in models
Hi *,
I''m going mad because I''m not able to implement a custom sort on an
array of models.
The order must be by type, where type are custom strings, so Subject
> LessonPlan > Assignment > Resource and if the type is the same by
date using a datetime field (created_at).
def <=>(other)
if self["type"] == "Subject"
return +1
elsif other["type"] == "Subject"
return -1
elsif self["t...