Hi there,
In Ruby & in RoR I oft find myself testing whether an object exists, then whether an object's properties match some criteria. Like so:
if params[:id] && params[:id].size == 40
...do stuff
end
Is there a more efficient way to do this? Something like:
if params[:id].size == 40 rescue false
but without using the rescue?