RE: I need superman!


#1

I think you should be able to make it work manually, although you miss
out on some rails ‘magic’ because of your schema requirements. For
example [psuedo rails code which doesn’t take into account reserved
words, mysql quirks etc]

class Child < ActiveRecord::Base
def find_parent
Parent.find_all :conditions => [‘number = ?’, item_number[0…-3] +
‘00’ ]
end
end

class Parent < ActiveRecord::Base
def find_children
Child.find_all :conditions => [‘item_number like ?’, number[0…-3] +
‘%’ ]
end
end

HTH