Dynamically mount Carrierwave uploader on serialized field <p>I'm creating this app where users are able to dynamically add custom fields (<code>TemplateField</code>) to a template (<code>Template</code>) and use that template on a page (<code>Page</code>).</p> <p>The custom fields can have type text or image, and have custom naming. A user can for instance create at field named Profile picture of type image to their template.</p> <p>I can't however figure out how to dynamically mount a CarrierWave uploader to fields of type image, when everything is saved to an <code>hstore</code> attribute (<code>properties</code>) on the page model.</p> <p>Any help is much appreciated!</p> <pre><code>class Template &lt; ActiveRecord::Base has_many :template_fields has_many :pages end class Page &lt; ActiveRecord::Base belongs_to :template store_accessor :properties end class TemplateField &lt; ActiveRecord::Base belongs_to :template end </code></pre>