Displaying 1 result from an estimated 1 matches for "find_all_include_build".
2006 Jan 31
2
Setting a default order for a model?
Hi,
I''m using a room model throughout my code. I keep doing the following:
@rooms = Room.find(:all, :order => ''buildings.name, room_number'',
:include => :building)
I have to copy this into several of my controllers and I feel that I''m
violating the DRY principle. Can I set this as the default order in my
model? If so, how would I do that?
Thanks,