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.
Rick (Guest)
on 2007-03-15 17: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?
Rick (Guest)
on 2007-03-15 17:57
(Received via mailing list)
arrggghhhh

Of course it should be

<%= javascript_include_tag :defaults %>
not :default
Michael W. (Guest)
on 2007-03-15 17: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 W.
Peter De Berdt (Guest)
on 2007-03-15 18: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
Tino B. (Guest)
on 2007-03-15 18: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.