Forum: Ruby on Rails dumb question ;-)) about dynamic naming ..

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.
Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2009-02-20 16:17
(Received via mailing list)
in one of my partial I have :

<div id="horizontal_carousel">
.....
<script>
  new UI.Carousel("horizontal_carousel");
</script>


but if I need to specify multi carousels, I need to dynamically modify
the name
<div id="<%= product_carousel_name(taxon) %>" >
..
so I would like to have :
<script>
  new UI.Carousel("<%= product_carousel_name(taxon) %>");
</script>

but I don't know how to get it ?    any suggestion ?

thanks

erwin
This topic is locked and can not be replied to.