mobile application developer singapore,mobile apps development singapore,singapore web design,web designer singapore,singapore app developer,website development singapore,mobile apps singapore,mobile application development singapore,ios developer singapore,web application singapore,website design singapore,singapore mobile application developer,developers in singapore,mobile app development singapore,web design company singapore,website designer singapore,ruby on rails developer singapore,web design singapore,mobile game developer singapore,website developer singapore,web development singapore,singapore web development,app development singapore,web development company singapore,singapore mobile app developer,singapore web design services,developer in singapore,graphic designer in singapore,web design services singapore,singapore website design,mobile app developer singapore,android developer singapore,ios app development singapore,design firms in singapore,app developer singapore,design agency singapore,mobile developer singapore

Ruby on Rails 3 and escaped HTML

Rails 3 assumes that everything is NOT html safe (a change of opinion from Rails 2). Now, all strings are html escaped by default:

<%= h some_string %>

is now the same as

<%= some_string %>

To unescape the HTML (i.e you already know that the string is OK to render out), you need to mark it as html_safe or use keyword raw :

<%= some_string.html_safe %>
or
<%=raw some_string %>

%d bloggers like this:
WordPress