could you just check why the ruby script not work it work when only use the field name : <%= land_area_unit -%>
because the the field display not right, when its sqm, it show M2 I want it show m², that's why I want to write a if statement to showing the right unit format: <%= if land_area_unit == M2 %>m² <% else %> <%= if land_area_unit == HA %>Ha <% else %><%= if land_area_unit == AC %>Ac<% else %>f² Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ed8a1a13a91a7ffd21c1882f00e08695%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.