mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-05-27 04:28:55 +09:00
14 lines
306 B
Ruby
14 lines
306 B
Ruby
module BroadcastsHelper
|
|
def broadcast_image_tag(image, options)
|
|
image_tag(broadcast_image_path(image), options)
|
|
end
|
|
|
|
def broadcast_image_path(image)
|
|
if image.is_a?(Symbol) || image.is_a?(String)
|
|
image_path(image)
|
|
else
|
|
polymorphic_url(image, only_path: true)
|
|
end
|
|
end
|
|
end
|