Files
once-campfire/app/helpers/broadcasts_helper.rb
Kevin McConnell df76a227dc Hello world
First open source release of Campfire 🎉
2025-08-21 09:31:59 +01:00

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