I guess I can always just do this:
but I’m still wondering why I got the error.
On 10 Aug 2011, at 19:15, 7stud – wrote:
“jquery.rails.js”
8: %>
9:
10:
Ruby looks at the code in line 6, and thinks you’re just calling
javascript_include_tag without any arguments. It then tries to parse
line 7 as a new statement, but doesn’t know what to do with a string
followed by a comma.
If you put the first argument to javascript_include_tag on the same line
(i.e. combine lines 6 and 7), then Ruby will know you’re listing
arguments to javascrip_include_tag, and it’ll work.
Chris
Chris M. wrote in post #1016050:
If you put the first argument to javascript_include_tag on the same line
(i.e. combine lines 6 and 7), then Ruby will know you’re listing
arguments to javascrip_include_tag, and it’ll work.
Thanks. That means I can do this:
<%=
javascript_include_tag(
“http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”,
“jquery.rails.js”)
%>