def xlassrepresented.class.to_s.split(':')[0].constantizeend
def child_representerbase_class=represented.class.to_s.split(':')[0]rep_class = 'Api::V1::' + base_class + 'Representer'rep_class #.constantizeendoptions = {class: :xlass,extend: QuestionRepresenter,# HELP# I want to call a method child_representer to dynamically find the right collection item representer# this does not work and fails with no such method or error#embedded: true,#decorator_scope: true,as: "osdi:questions"}collection :all, options
Josh Cohen jos...@gmail.com | @joshco | LinkedIn | GitHub | OSDI opensupporter.org
"If [OSDI]
succeeds, it could usher in the next chapter in political technology." - Washington Post
In the LGBT community, Domestic Abuse is the friendly-fire equivalent of bullying, sexual assault, discrimination, Religion based bigotry and other types of subjugation.
Let's stop it. Please help