Rails 3 rendering iframe with raw() -
so storing whole embed code youtube database , outputting this.
<%= raw(people.video) %>
which outputs general iframe tag copied youtube:
<iframe src="foo" width=400 height=380></iframe>
the problem displays tag instead of embedding video page itself. can around storing src in database.... part of mini cms system , site admins find easier copy , past embed code youtube. there someway can specify iframe render instead of spitting out html on page?
you can use raw
method render html of string, storing way? can try redcloth
gem - able working so:
<%= raw redcloth.new(@page_content.content).to_html %>
which allowed custom cms use textile markup http://en.wikipedia.org/wiki/textile_%28markup_language%29
i'm not 100% on you're seeing, since raw should render html, might try include embed tag using javascript.write, since there issues related flash objects embedded in html vs javascript.
let me know if doesn't work, , if so, can provide screenshots or copy you're seeing on page?
Comments
Post a Comment