Forum: Ruby ERuby.import using vars

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.
Peter W. (Guest)
on 2008-10-15 00:52
Hi
I'm trying to use ERuby.import with a var in the path. Is this possible?

<% ERuby.import('../#{path}/menu') %>

Thanks
Hoesel, Daniël van (Guest)
on 2008-10-15 01:01
(Received via mailing list)
> I'm trying to use ERuby.import with a var in the path. Is this possible?

If you use "" instead of '' it should work.

<% ERuby.import("../#{path}/menu") %>

Daniel
Peter W. (Guest)
on 2008-10-15 23:19
Hoesel, Daniël van wrote:
>> I'm trying to use ERuby.import with a var in the path. Is this possible?
>
> If you use "" instead of '' it should work.
>
> <% ERuby.import("../#{path}/menu") %>
>
> Daniel

Hi Daniel
Many thanks.
This topic is locked and can not be replied to.