# Link\_to method doesn't work with shared css/javascript class

**URL:** <https://www.ruby-forum.com/t/link-to-method-doesnt-work-with-shared-css-javascript-class/135079>\
**Category:** Ruby\
**Created:** [April 17, 2008, 5:28pm UTC](https://www.ruby-forum.com/t/link-to-method-doesnt-work-with-shared-css-javascript-class/135079 "2008-04-17T17:28:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![claus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@claus](https://www.ruby-forum.com/u/claus)\
**Post date:** [April 17, 2008, 5:28pm UTC](https://www.ruby-forum.com/t/link-to-method-doesnt-work-with-shared-css-javascript-class/135079/1 "2008-04-17T17:28:43Z")

</div>

ddaccordion.init({ headerclass: "expandable", ..... \</script

- \<%= link\_to "institut", {:controller =\> "news"} %\>
...at first I want to say that I'm pretty new in ruby ... may u are able to help me: i have an accordion navigation and the headers, which should expand on click, should link to my different sites.everything works fine, however, when the link\_to method is nested in a tag where my shared css class, which javascript uses do locate my expandable headers, appears, the link doesn't work any longer. i hope u can help me! thanx

---

<div class="post-metadata">

**Author:** ![claus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@claus](https://www.ruby-forum.com/u/claus)\
**Post date:** [April 17, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/link-to-method-doesnt-work-with-shared-css-javascript-class/135079/2 "2008-04-17T17:43:56Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Claus S. wrote:

| i hope u can help me! thanx

Rails questions are better asked to the Rails guys:

> **[Community](https://rubyonrails.org/community)**
>
> A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)

Ytterby, Sweden begat 4 elements: Yttrium, Ytterbium, Terbium, Erbium  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgHb+MACgkQbtAgaoJTgL8gOACfQkGS0tygBr2klE6wMBIghbuS  
DaIAoJaDv0xco0byOopOI0XqhXDUA30U  
=Mkv3  
-----END PGP SIGNATURE-----
