CoralineAda / seer

Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.
http://www.idolhands.com/ruby-on-rails/gems-plugins-and-engines/graphing-for-ruby-on-rails-with-seer
MIT License
133 stars 15 forks source link

Generated JavaScript gets printed instead of executed #10

Open fletz opened 13 years ago

fletz commented 13 years ago

Hello, I integrated seer in a Rails 3 project and followed the tutorials and instructions to the letter. It executes, but in the view the javascript gets escaped or something, because it is just inserted with < and > instead of < and >, so it gets printed instead of executed.

This is the case for both the Seer::init_visualization and the Seer::visualize methods.

I tried it with haml first and now with erb, but the result is the same.

Greetings, Flo

cmeiklejohn commented 12 years ago

Can't you just call .html_safe on the output?

hehejo commented 12 years ago

I‘m using the raw output helper: <%=raw Seer::init_visualization -%>