Forum: Ruby on Rails convert to rails

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.
Johny b. (Guest)
on 2009-04-02 13:54
how to convert this on rails

<!--[if lt IE 7]>
<script type="text/javascript" src="example.js"></script>
<![endif]-->
Frederick C. (Guest)
on 2009-04-02 14:05
(Received via mailing list)
On Apr 2, 10:54 am, Johny ben <removed_email_address@domain.invalid>
wrote:
> how to convert this on rails
>
> <!--[if lt IE 7]>
> <script type="text/javascript" src="example.js"></script>
> <![endif]-->

There's nothing to convert  - that's just pure html.

Fred
Johny b. (Guest)
on 2009-04-02 14:36
Frederick C. wrote:
> On Apr 2, 10:54�am, Johny ben <removed_email_address@domain.invalid>
> wrote:
>> how to convert this on rails
>>
>> <!--[if lt IE 7]>
>> <script type="text/javascript" src="example.js"></script>
>> <![endif]-->
>
> There's nothing to convert  - that's just pure html.
>
> Fred

what I understand to add a external javascript link on rails
are to add like this
   <%= javascript_include_tag :javascriptfilename %>
although this link work on rails.
 <!--[if lt IE 7]>
   <script type="text/javascript" src="example.js"></script>
 <![endif]-->
I want to know if this html link have equivalent on rails.
Matthew MacLeod (Guest)
on 2009-04-02 14:57
(Received via mailing list)
On 2 Apr 2009, at 11:36, Johny ben wrote:

>   <%= javascript_include_tag :javascriptfilename %>
> although this link work on rails.
> <!--[if lt IE 7]>
>   <script type="text/javascript" src="example.js"></script>
> <![endif]-->

You can still wrap an asset helper in the conditional comment:

<!--[if lt IE 7]>
  <%=javascript_include_tag "example"%>
<![endif]-->


-Matt
This topic is locked and can not be replied to.