How do you scroll a field on a custom engine in a refinery

I am creating a custom engine in refinery cms and I have a field called "PDF" which is a type of resource field.

Some entries in the engine will have only one PDF file, while others will have several PDF files. Is there a way to do this without creating a bunch of extra fields that I don't need?

I would rather iterate over one pdf field rather than add additional fields to my engine - pdf_1: resource, pdf_2: resource, pdf_3: resource, pdf_4: resource, pdf_5: resource, etc.

How do you do this?

+5
source share
2 answers

, . has_many , .

+1

?

pdf, my_custom_engine, my_custom_engine has_many pdfs. accepts_nested_attributes javascript , my_custom_engine. :

http://railscasts.com/episodes/196-nested-model-form-revised?autoplay=true

, , , , .

0

All Articles