There is Item polymorphic model.
One of it's attributes is Product. And I want to have different Product
listings according to Item's parent class (nested).
And I have put a lot effort in to this problem and yet can't find the solution.
To better understand the problem, there is my ItemsHelper:
module ItemsHelper
def options_for_association_conditions(assoc)
if assoc.name == :product
case METHOD_TO_ACCESS_CURRENT_PARENT_CLASS_NAME
when "Invoice"
one condition
when
another condition
else
super
end
else
super
end
end
end
I will be very grateful for any solution.
Original issue reported on code.google.com by shara...@gmail.com on 12 Jul 2010 at 7:30
Original issue reported on code.google.com by
shara...@gmail.com
on 12 Jul 2010 at 7:30