Rob Biedenharn wrote in post #968091:
On Dec 12, 2010, at 4:59 PM, Rodrigo Mendona wrote:
other way is
%=p.user.name unless p.user.empty?%
Or, you can push that into the model and avoid the extra logic in the
view:
class Post
def user_name
self.user ? self.user.name : (none)
On Dec 13, 2010, at 2:40 PM, Marnen Laibow-Koser wrote:
Rob Biedenharn wrote in post #968091:
On Dec 12, 2010, at 4:59 PM, Rodrigo Mendona wrote:
other way is
%=p.user.name unless p.user.empty?%
Or, you can push that into the model and avoid the extra logic in the
view:
class Post
def
On 13 December 2010 19:40, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Rob Biedenharn wrote in post #968091:
On Dec 12, 2010, at 4:59 PM, Rodrigo Mendona wrote:
other way is
%=p.user.name unless p.user.empty?%
Or, you can push that into the model and avoid the extra logic in the
view:
3 matches
Mail list logo