mobile application development singapore,singapore mobile application developer,singapore web design services,mobile game developer singapore,website developer singapore,website designer singapore,web development singapore,mobile apps singapore,singapore mobile app developer,web development company singapore,web design company singapore,app developer singapore,singapore web development,mobile application developer singapore,mobile apps development singapore,singapore web design,web designer singapore,ios app development singapore,design firms in singapore,developers in singapore,app development singapore,web design singapore,design agency singapore,ruby on rails developer singapore,web application singapore,mobile developer singapore,singapore website design,developer in singapore,mobile app development singapore,website development singapore,graphic designer in singapore,web design services singapore,singapore app developer,ios developer singapore,website design singapore,mobile app developer singapore,android 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