Marco Antonio Almeida wrote in post #1183823:
Hi Rynn,
On Mon, Jun 6, 2016 at 12:15 AM Rynn Steinbolt wrote:

The snippet in question is this one, it lives in an .html.erb file:

var hour = [
<% @raw.each do |raw| %>
[ <%= if raw.status == "aufgewacht" %>
It seems that your problem is here. You don't want to output the if
condition so you should actually have:

<% if raw.status == "aufgewacht" %>
Thank you! That does indeed get rid of the error messages. I wonder how
i missed this.
However, the code still doesnt work - there is no data displayed.

Maybe the syntax highlighting makes it a bit clearer. Compare the two
attached snippets, one with the js/erb code (with a working var hour
below it, to demontrate that the js is (probably) not the problem, and
some reguler embedded ruby without js.


Posted via

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
grouprubyonrails-talk @
postedJun 5, '16 at 10:14p
activeJun 6, '16 at 2:57p



site design / logo © 2021 Grokbase