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.
19df66bc8d455d20a253bb1446f48349?d=identicon&s=25 Peter Woodsky (webspider)
on 2008-10-14 22:52
Hi
I'm trying to use ERuby.import with a var in the path. Is this possible?

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

Thanks
33ebbe45f5ddb2738a5978310232f05b?d=identicon&s=25 Hoesel, Daniël van (Guest)
on 2008-10-14 23: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
19df66bc8d455d20a253bb1446f48349?d=identicon&s=25 Peter Woodsky (webspider)
on 2008-10-15 21: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.