Tag upload

10 votes

32 comments

15120 views

Use STI and polymorphic model for multiple uploads

This is a flexible and reusable solution for multiple uploads, using STI model to save all the uploaded assets in one "assets" table and using polymorphic model to reuse "Asset" model in different uploadable models.

flyerhzm
Fork me on GitHub