Forum: Ruby on Rails javascript_inlcude_tag :default error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0c51049fb747cd60088e4878458e05d1?d=identicon&s=25 Rick (Guest)
on 2007-03-15 16:52
(Received via mailing list)
I'm running rails 1.2.2 with ruby 1.8.5.
I have a layout with:
<%= javascript_include_tag :default %>
which gives this error:
can't dup Symbol

However, this works:
<%= javascript_include_tag 'prototype' %>

Any ideas what the problem might be?
0c51049fb747cd60088e4878458e05d1?d=identicon&s=25 Rick (Guest)
on 2007-03-15 16:57
(Received via mailing list)
arrggghhhh

Of course it should be

<%= javascript_include_tag :defaults %>
not :default
Dfd6f9989147955682701da8227df8b4?d=identicon&s=25 Michael Wang (Guest)
on 2007-03-15 16:57
(Received via mailing list)
Rick wrote:
> I'm running rails 1.2.2 with ruby 1.8.5.
> I have a layout with:
> <%= javascript_include_tag :default %>
> which gives this error:
> can't dup Symbol
>
> However, this works:
> <%= javascript_include_tag 'prototype' %>
>
> Any ideas what the problem might be?

It's ":defaults", not ":default" (no quotes).


--
Michael Wang
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2007-03-15 17:00
(Received via mailing list)
On 15 Mar 2007, at 16:50, Rick wrote:

> I'm running rails 1.2.2 with ruby 1.8.5.
> I have a layout with:
> <%= javascript_include_tag :default %>

Typo? Needs an 's' at the end

<%= javascript_include_tag :defaults %>


> which gives this error:
> can't dup Symbol
>
> However, this works:
> <%= javascript_include_tag 'prototype' %>

Best regards

Peter De Berdt
18b20ac93be26c4b3321dae42b2e9f16?d=identicon&s=25 Tino Breddin (Guest)
on 2007-03-15 17:02
(Received via mailing list)
Hi,
it has to be :defaults instead of :default,

<%= javascript_include_tag :defaults %>

bye,
Tino
This topic is locked and can not be replied to.