This question is for very very specific case, where I may change params. This is not a part of any rails app.
params is {:email => " ab", :xyz => " ", :opq => nil}
I run following :
params.each{|_, v| v.strip! if v}
params.keep_if{|_, v| v.length > 0 if v}
to get params as
{:email => "ab"}
is there anyway to merge above two lines into one?
1 Answer