开发者

Hpricot and Rails Rendering

I finally managed to get Hpricot and Rails working together as below:

parser_controller:

def deck require 'hpricot' require 'open-uri' @doc = open("http://www.keo.co.za/") { |f| Hpricot(f) } end end

deck view:

<%=(@doc/"#list-of-posts h2 ").inner_html%>

which gives me:

KeoTV: D-Day for desperate Boks

Which is awesome, but now I want to render 开发者_如何学Goit in a list instead of it just showing me html in one single line? How can I make it show it to me in another output visibly instead of just HTML?

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜