My question is essentially the same as this one: Polymorphic Association with multiple associations on the same model
However, the proposed/accepted solution does no
Had tough times after discovering this issue but got cool solution that works
Add to your Gemfile
gem 'mongoid-multiple-polymorphic'
And this works like a charm:
class Resource
has_one :icon, as: :assetable, class_name: 'Asset', dependent: :destroy, autosave: true
has_one :preview, as: :assetable, class_name: 'Asset', dependent: :destroy, autosave: true
end