Skip to content

No need to check twice for `nil?` as `blank?` already does it

Matthias Käppler requested to merge github/fork/zenati/patch-5 into master

Created by: zenati

No need to check twice for nil? as blank? already does it. Because '', ' ', nil, [], and {} are all blank.

See: http://api.rubyonrails.org/classes/Object.html#method-i-blank-3F

return if params[:search].nil? || params[:search].blank?

Should be:

return if params[:search].blank?

Merge request reports

Loading