samedi 5 juillet 2014

Why are hyphens invalid in JS-like syntax for hashes in Ruby


Vote count:

0




Going through Hartl's Rails tutorial, and he mentions that while:



stylesheet_link_tag "application", { media: "all",
"data-turbolinks-track" => true }


is valid



stylesheet_link_tag "application", { media: "all",
data-turbolinks-track: true }


is not valid because "invalid because of hyphens." Can anyone explain this further for me? Why do hyphens make this invalid?



asked 5 mins ago






Aucun commentaire:

Enregistrer un commentaire