Sha256: 7030166a849ef47baf08598dd17a636136a0d27b23eceab90ccf481bdf04d646

Contents?: true

Size: 327 Bytes

Versions: 33

Compression:

Stored size: 327 Bytes

Contents

module Spree
  module FilterParam
    extend ActiveSupport::Concern

    included do
      before_save :set_filter_param
    end

    protected

    def set_filter_param
      return if param_candidate.blank?

      self.filter_param = param_candidate.parameterize
    end

    def param_candidate
      name
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
spree_core-4.10.1 app/models/concerns/spree/filter_param.rb
spree_core-4.10.0 app/models/concerns/spree/filter_param.rb
spree_core-4.9.0 app/models/concerns/spree/filter_param.rb
spree_core-4.8.3 app/models/concerns/spree/filter_param.rb
spree_core-4.8.2 app/models/concerns/spree/filter_param.rb
spree_core-4.7.3 app/models/concerns/spree/filter_param.rb
spree_core-4.6.6 app/models/concerns/spree/filter_param.rb
spree_core-4.5.5 app/models/concerns/spree/filter_param.rb
spree_core-4.3.3 app/models/concerns/spree/filter_param.rb
spree_core-4.4.1 app/models/concerns/spree/filter_param.rb
spree_core-4.5.4 app/models/concerns/spree/filter_param.rb
spree_core-4.6.5 app/models/concerns/spree/filter_param.rb
spree_core-4.7.2 app/models/concerns/spree/filter_param.rb
spree_core-4.7.1 app/models/concerns/spree/filter_param.rb
spree_core-4.6.4 app/models/concerns/spree/filter_param.rb
spree_core-4.7.0 app/models/concerns/spree/filter_param.rb
spree_core-4.6.3 app/models/concerns/spree/filter_param.rb
spree_core-4.6.2 app/models/concerns/spree/filter_param.rb
spree_core-4.6.1 app/models/concerns/spree/filter_param.rb
spree_core-4.6.0 app/models/concerns/spree/filter_param.rb