J
Josselin
as a new(ru)bie I always wonder when trying to DRY such code is good or
not and why it should be (I don't like a lot the if.. else.. elsif...
but sometimes it seems better for readiness... vs performances (less
code..)
If I should DRY it , any tip ?
if params[:new_title].blank?
params[:new_title] = nil
elsif params[:new_title] == "null"
params[:new_title] = ""
end
joss
not and why it should be (I don't like a lot the if.. else.. elsif...
but sometimes it seems better for readiness... vs performances (less
code..)
If I should DRY it , any tip ?
if params[:new_title].blank?
params[:new_title] = nil
elsif params[:new_title] == "null"
params[:new_title] = ""
end
joss