jamal
September 9, 2010, 5:34pm
1
Hello,
Is there any configuration in Rails 3 since it destroy my HTML when i
try to print something out ?
Example:
<%= navigation [{:users => admin_users_path}] %>
<li class=""><a
href="/admin/users">users</a></li>
I have taken those from view source, why is this happening in Rails 3?
I’m missing something out?
Thanks.
jamal
September 9, 2010, 5:41pm
2
what is navigation??? because i bet is not an object, so rails thinks is
html and is scaping it, if navigation is text the way to do it is
<%=“navigation #{:users => admin_users_path}”%>
jamal
September 9, 2010, 5:45pm
3
are you using simple navigation ?? in that case navigation [{:users =>
admin_users_path}] is a method but it looks like the gem is not rails 3
ready
go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3
ready
jamal
September 9, 2010, 8:07pm
4
On Sep 9, 4:34 pm, Jamal S. [email protected] wrote:
<li class=""><a
href="/admin/users">users</a></li>
I have taken those from view source, why is this happening in Rails 3?
Sounds like you should read about the xss protection that is in rails
3 (and rails 2.3.6 if my memory is correct) - rails knows about
strings that should be escaped and strings that shouldn’t, if you
write your own view helpers you occasionally need to tell rails that a
string is safe so that it doesn’t escape it for you
Fred
jamal
September 9, 2010, 9:11pm
5
try reading on html safe feature of rails 3
On Thu, Sep 9, 2010 at 2:00 PM, Frederick C.
<[email protected]
jamal
September 9, 2010, 9:09pm
6
radhames brito wrote:
are you using simple navigation ?? in that case navigation [{:users =>
admin_users_path}] is a method but it looks like the gem is not rails 3
ready
go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3
ready
http://www.railsplugins.org/plugins/257-simple-navigation
Looks like there’s a beta of that plugin that might work with Rails 3.