Sha256: d3db93a2847f4215d7cec6301ce3ff1b83bcd0e83de424869530139f1441b820

Contents?: true

Size: 277 Bytes

Versions: 8

Compression:

Stored size: 277 Bytes

Contents

module Headmin
  module FilterHelper
    def filter_param_exists?(name)
      return false unless params.has_key?(name)
      if params[name].is_a?(Array)
        params[name].reject { |c| c.empty? }.present?
      else
        params[name].present?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
headmin-0.2.5 app/helpers/headmin/filter_helper.rb
headmin-0.2.4 app/helpers/headmin/filter_helper.rb
headmin-0.2.3 app/helpers/headmin/filter_helper.rb
headmin-0.2.2 app/helpers/headmin/filter_helper.rb
headmin-0.2.1 app/helpers/headmin/filter_helper.rb
headmin-0.2.0 app/helpers/headmin/filter_helper.rb
headmin-0.1.2 app/helpers/headmin/filter_helper.rb
headmin-0.1.1 app/helpers/headmin/filter_helper.rb