Skip to main content

cl_video_tag / cl_video_path + Rails

Comments

1 comment

  • Raya Straus

    Hi Mary,

    Please find the following Attachinary sample project:
    https://github.com/taragano/attachinary_all_types

    Specifically, here's how to display a video tag: Note that it'll render the full video tag, not just the URL:
    https://github.com/taragano/attachinary_all_types/blob/master/app/views/posts/_preview.html.erb#L7

    Having said that, cl_video_path does seem to work well for me, e.g. (a is the model record, and file is the attachinary-associated attribute):

    cl_video_path a.file.public_id, format: a.file.format
    

    If that still doesn't work, please make sure you're using the latest versions of both SDKs (Cloudinary and Attachinary).

    As an alternative, you can use the following instead:

    cloudinary_url a.file.public_id, format: a.file.format, resource_type: a.file.resource_type
    0

Post is closed for comments.