Skip to content

Instantly share code, notes, and snippets.

View moxiesoft's full-sized avatar

moxiesoft moxiesoft

View GitHub Profile
# Maps parents_symbols to build association chain.
#
# If the parents_symbols find :polymorphic, it goes through the
# params keys to see which polymorphic parent matches the given params.
#
# When optional is given, it does not raise errors if the polymorphic
# params are missing.
#
def symbols_for_association_chain #:nodoc:
polymorphic_config = resources_configuration[:polymorphic]