From the rails Ruby Object extenstion, The Object#blank? is now covering nil, blank and empty responses.
so:
elad = nil elad.blank? # trueand even empty containers
elad = [] elad.blank? # true
note: Remember that this is a Rails extension to Ruby's Object, so it will not work on IRB, but will on console
0 comments:
Post a Comment