J
jko170
Looking at this piece of code, what does the colon do?
def partner_to(user)
raise ArgumentError unless user
user.id == recipient_id ? sender : recipient
end
I got the code from this rails post:
http://groups.google.com/group/ruby...k=gst&q=internal+mail&rnum=1#6112294580b9e0ce
I'm just asking because I've never seen the colon used before.
def partner_to(user)
raise ArgumentError unless user
user.id == recipient_id ? sender : recipient
end
I got the code from this rails post:
http://groups.google.com/group/ruby...k=gst&q=internal+mail&rnum=1#6112294580b9e0ce
I'm just asking because I've never seen the colon used before.