title: How to dynamically determining carrierwave uploader column name?
body: <p>I have some meta-programming that condenses multiple direct S3 upload processes into a single controller.  Then, those actions are shared across many models.  To accomplish this, among many other details, I need to know the column name of a given models uploader.  I facilitate this by having an 'uploader_name' method in each of my models that use the shared actions.  For example, I have an Expense model that has a receipts uploader...</p>
  
  <pre><code>def uploader_name
    'receipt'
  end 
  
  mount_uploader :receipt, ReceiptUploader
  </code></pre>
  
  <p>So, now I can call Expense.new.uploader_name to return a string, or in a shared action I would use @obj.send(@obj.uploader_name) to get the uploader object (where @obj is any one of the affiliated models using the shared actions).  This works fine.  However, I think I can clean it up.  One way that would help me refactor is not needing the uploader_name method.  Or, being able to use a single uploader_name method in a shared module that is able to dynamically determine the column name of the uploader.</p>
  
  <p>Is there a method within Carrierwave where I can access the column name on a models uploader without know what the uploader is called?  Since the module is shared across multiple classes, i have to figure it out dynamically---I have read through the carrierwave, but not finding a solution.</p>
  
  <p>Something like this...for example: </p>
  
  <pre><code>obj = self.class.name
  obj.new.uploader # would return the mounted :receipts uploader
  obj.new.uploader_column # would return the uploader column, in this case :receipt
  </code></pre>