search for: myusertype

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

2005 Mar 28
0
Active Record: finding records based on :belongs_to values
...f I override find_all, it looks like I want to set a join clause, then delegate up to my superclass'' find_all? Does that make sense? So I want to do something like: def self.find_all(conditions = nil, orderings = nil, limit = nil, joins = nil) acc_join = ''LEFT JOIN accounts ON myusertype.account_id = accounts.id '' if joins joins << acc_join else joins = acc_join end super end Am I on the right track? Is there some Rails magic that does this for me? Thanks, Arien