how to get the enclosure’ url value when reading the rss feed? I
define a help method to judge if there is a enclosure in a rss
item,and use it in a view,the codes are following:
########
module EncodeHelper
def enclosure?(item)
if item.to_s.scan(“<enclosure”).length > 0
return true
else
return false
end
end
end
#########
the view codes:
<%if enclosure?(item)-%>
Download:
<%=item.enclosure.url-%>
<%end-%>
##########
I got nothing about enclosure’s url value and display,but indeed,there
are enclosure tag in the rss page source code (http://drop.io/
eupdibcj58n5ywbpuzwa/0d231f619d5e84fd1f4c3ab90465915f5e5e665f/
showreelfinder.rss).
How to manage it? Thanks!
how to get enclosure tag attr value?
I have searched via google,It seems there is not a perfect tutorial
abou this