Skip to content

Use on non-image assets #5

@rlmattax

Description

@rlmattax

I'm hoping to find a way to attach non-image objects to a model. The example at hand is an html file.

I'm also trying to do the attachment within a model instead of using the uploader.

Do you have any suggestions for doing these things?

This is how I'm using it

--------------

publisher.rb

assetable :ad_block # the html chunk

Then just for the sake of testing things, I opened the console, and attempted (based largely on my experience with carrier wave):

publisher.ad_block = File.open("ad_block.html")

ang get this error:
NoMethodError: undefined method `id' for #File:ad_block.html

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions