blueprinter
blueprinter copied to clipboard
It's possible put a foreign_key for a association?
I need to specify a custom foreign_key for an association...it's possible with BluePrinter? In my serializer there is: belongs_to :sede_azienda_spedizione, class_name: 'SedeAziendaSpedizione', foreign_key: 'spedizione_def_id'
How can I write it with this gem?
Thanks in advance
You shouldn't need to do anything special as long as. the association itself is defined as you want. If that is what you're using for the association in your model, you should be able to just use
association: :sede_azienda_spedizione, blueprint: ...
in your blueprint.