English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to use this method in my view. The is_active field returns true or false and I want to display it as yes or no instead

<%=user.is_active%>

So I want a way of doing something like this,

<%=user.is_active%>? yes: no

Can anyone help me?

2007-12-11 05:50:34 · 1 answers · asked by theedge2343 2 in Computers & Internet Programming & Design

1 answers

Have you tried <%=user.is_active ? "yes" : "no" %>

2007-12-11 06:06:58 · answer #1 · answered by asztal^_^ 3 · 0 0

fedest.com, questions and answers