Sha256: 649e85f65803bc1d2e411150c645be7d0541e0d836dbb8e28450ae01a5ae5713

Contents?: true

Size: 251 Bytes

Versions: 6

Compression:

Stored size: 251 Bytes

Contents

module Spree
  module NamedType
    extend ActiveSupport::Concern

    included do
      scope :active, -> { where(active: true) }
      default_scope { order(Arel.sql("LOWER(#{table_name}.name)")) }

      include Spree::UniqueName
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_core-4.10.1 app/models/concerns/spree/named_type.rb
spree_core-4.10.0 app/models/concerns/spree/named_type.rb
spree_core-4.9.0 app/models/concerns/spree/named_type.rb
spree_core-4.8.3 app/models/concerns/spree/named_type.rb
spree_core-4.8.2 app/models/concerns/spree/named_type.rb
spree_core-4.7.3 app/models/concerns/spree/named_type.rb