Open kivanio opened 14 years ago
Hi guys, last week i found out a bug in Helpers with new rails 3 or rails_xss html escape.
This piece of code:
if ascending options[:as] = "▲ #{options[:as]}" css_classes << "ascending" else options[:as] = "▼ #{options[:as]}" css_classes << "descending" end
aren't working because "▼ " in the code.
So in my code i did this way:
if ascending options[:as] = Rails.version >= "2.3.6" ? "▲ #{options[:as]}".html_safe : "▲ #{options[:as]}" css_classes << "ascending" else options[:as] = Rails.version >= "2.3.6" ? "▼ #{options[:as]}".html_safe : "▼ #{options[:as]}" css_classes << "descending" end
This fix my problem in all my rails app 2.3.x and i don't if this is the best idea or if work in 2.2.x.
It's just an idea for you think.
Hi guys, last week i found out a bug in Helpers with new rails 3 or rails_xss html escape.
This piece of code:
aren't working because "▼ " in the code.
So in my code i did this way:
This fix my problem in all my rails app 2.3.x and i don't if this is the best idea or if work in 2.2.x.
It's just an idea for you think.