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.

Attachments:
http://www.ruby-forum.com/attachment/11367/Auswahl_004.jpg
http://www.ruby-forum.com/attachment/11368/Auswahl_006.jpg


--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1c77ef7500ca72a3d39fdfbaf4f3a2d3%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 5, '16 at 10:14p
activeJun 6, '16 at 2:57p
posts5
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase