pushtype / push_type

PushType is a modern, open source content management system for Ruby on Rails.
http://www.pushtype.org
Other
290 stars 32 forks source link

media_path not returning correct URL #27

Closed aaronrussell closed 7 years ago

aaronrussell commented 7 years ago

From @danobot raised here:

https://discuss.pushtype.org/t/linked-assets-creates-broken-link/194/5

This code

media_path(video.thumbnail, style: :small)

Expected

/media/<correct file path>.jpg?style=small

Actual behavior

/media/f7fcccc1-58a0-4748-b061-6119211e00fb?style=small

Workaround

media_path(video.thumbnail.file_uid, style: :small)

The media path helpers are not overriding the routing path helpers, so it is falling back to the old behaviour. Related to commit 2336d484

aaronrussell commented 7 years ago

Possibly related to #23

aaronrussell commented 7 years ago

Think this issue was because OP was using an outdated version of push_type that pre-datated the new media_path helpers.

https://discuss.pushtype.org/t/linked-assets-creates-broken-link/194/8