Hoang Tran's blog
Do reinvent the wheels...
Monday, September 27, 2010
Ruby code snippets
1. using 'any?' to check if something in a array/hash
# a = User.all
a
.
any?
{
|user| user
.
name
=
=
"Hoang"
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
Hoang Tran
Ho Chi Minh, Vietnam
A mad guy does mad things!
View my complete profile
Search This Blog
Followers
Readings
Thai Hacker
PhdVN
Blog Khoa Hoc May Tinh
GS Ngo Bao Chau
Blog Archive
►
2011
(14)
►
June
(1)
►
May
(4)
►
April
(1)
►
March
(5)
►
February
(3)
▼
2010
(7)
►
October
(1)
▼
September
(2)
Ruby code snippets
Some ways to refactoring Rails' code
►
May
(3)
►
April
(1)
►
2009
(1)
►
February
(1)
►
2008
(1)
►
July
(1)
No comments:
Post a Comment