Extend proxies with module / give it a block with logic to include
thhermansen opened this issue · comments
Thorbjørn Hermansen commented
It would be nice to have something like:
module CustomLogicForAddressProxy
def find_by_street(street)
# custom logic
end
end
class Person < MassiveRecord::ORM::Table
# Either..
embeds_many :addresses, :extend => CustomLogicForAddressesProxy
# ..or
embeds_many :addresses do
def find_by_street(street)
# custom logic
end
end
end