Ruby on Rails simple_navigation Gem

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-04-26T03:30:55Z Indexed on 2010/04/26 3:33 UTC
Read the original article Hit count: 614

I'm using the simple_navigation gem with RoR 2.3.5

It all seems to work correctly, I followed the info in the RDoc (seen here http://rdoc.info/projects/mexpolk/simple_navigation)

However, when I actually render out the simple_navigation menu on my main application.html.erb file it escapes all of the html in it (multiple escapes actually).

I end up with junk like this which in a browser ends up with all kinds of disjointed text and ["\ things everywhere.

    <ul class="simple_navigation" depth="0" id="simple_navigation_default">
            ["<li class=\"menu\" drop_down=\"true\" id=\"simple_navigation_default_menus_home\"><a href=\"/home\">Wellcome</a><ul depth=\"1\" id=\"simple_navigation_default_menus_home_menus\">
            [\"<li class=\\\"menu\\\" drop_down=\\\"false\\\" id=\\\"simple_navigation_default_menus_home_menus_settings\\\"><a href=\\\"/home/settings\\\">Appliction Settings</a></li>\"]
 </ul>
        </li>"]

What am I doing wrong? Is there a way to tell Ruby on rails to NOT escape html?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-gems