Personal Ruby On Rails cheatsheet
Methods | present? - | exists? | any? + |
blank? - |
empty? + |
none? | one?/many? | size + |
count - |
length |
---|---|---|---|---|---|---|---|---|---|---|
DB hit | X | X | X | |||||||
Memory Load | X | X | X | X | ||||||
Smart | X | X | X | X |
+: recommended -: do not use
Note:
one?
many?
: using size