Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails is posting it's syntax out loud when it should be running behind the scenes?

See update: for answer at bottom

Original question:

I have a <script></script> in my page and when it runs it does:-

<% Route.all.each do |route| %>
  var long = "<%= route.longitude %>";
  var lati = "<%= route.latitude %>";
  var title = "Route <%= route.route_number %> Stop <%= route.stop_number %>";
  var id = "<%= route.id %>";
<% end %>

But in Firebug I'm getting this error in console.

SyntaxError: syntax error
[Break On This Error]   
<% Route.all.each do |route| %>
 ^

Update: Turns out to be a firebug issue, works as intended but firebug will post as an error.

like image 499
Datsik Avatar asked Mar 12 '13 05:03

Datsik


1 Answers

This is either related to your environment ("production" doesn't show detailed error and debug info)

Or related to firebug itself (god bless them, couldn't live without it)

like image 101
Amir Mehler Avatar answered Oct 23 '22 11:10

Amir Mehler