Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

carrierwave-datamapper confuses the Uploader property with the underlying identifier property #11

Description

@postmodern

resource.attachment.filename always returns nil due to CarrierWave not being able to access the underlying identifier column. This occurs when the identifier column has the same name as the Uploader property (which currently is the only way to use carrierwave-datamapper due to issue #9).

However, I can directly access the identifier column using instance_variable_get("@attachment"). Also, resource.attachment.path behaves as expected.

carrierwaveuploader/carrierwave#249

Environment details:

  • Ruby: 1.8.7-p357
  • Rails: 3.0.11
  • DataMapper: 1.1.0
  • carrierwave: 0.5.8
  • carrierwave-datamapper: 0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions