【发布时间】:2010-11-25 00:58:08
【问题描述】:
我正在使用 GCal4Ruby gems 插件。
我正试图让它呈现一个嵌入式谷歌日历。
所以相关的方法就是这里描述的to_iframe:
http://cookingandcoding.com/docs/gcal4ruby/classes/GCal4Ruby/Service.html
当我调用该方法时,它会产生:
图一
<iframe src ="relevant_and_working_Gcal_URL" width="100%" height="300">
text here
</iframe>"
在页面中显示为文本,这是我想要的,但查看它呈现为的源:
图2:
<iframe src ="relevant_and_working_Gcal_URL" width="100%" height="300">
text here
</iframe>
所以我的问题是有没有任何 ruby 方法可以接受字符串参数并进行相关替换?
也就是说,它将接受字符串图2并返回图1中的字符串。
我会在一两个小时后回来发布一个确切的例子。
【问题讨论】:
标签: html ruby-on-rails iframe rubygems