Sha256: c94d0afda5e10e40cb50ad075de888f96042b614a341ad258158fb17567f8ae4

Contents?: true

Size: 586 Bytes

Versions: 76

Compression:

Stored size: 586 Bytes

Contents

class Spree::Base < ApplicationRecord
  include Spree::Preferences::Preferable
  serialize :preferences, Hash

  include Spree::RansackableAttributes

  after_initialize do
    if has_attribute?(:preferences) && !preferences.nil?
      self.preferences = default_preferences.merge(preferences)
    end
  end

  if Kaminari.config.page_method_name != :page
    def self.page(num)
      send Kaminari.config.page_method_name, num
    end
  end

  self.abstract_class = true

  def self.belongs_to_required_by_default
    false
  end

  def self.spree_base_scopes
    where(nil)
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
spree_core-3.6.4 app/models/spree/base.rb
spree_core-3.6.3 app/models/spree/base.rb
spree_core-3.6.2 app/models/spree/base.rb
spree_core-3.6.1 app/models/spree/base.rb
spree_core-3.6.0 app/models/spree/base.rb
spree_core-3.5.0 app/models/spree/base.rb
spree_core-3.6.0.rc1 app/models/spree/base.rb
spree_core-3.5.0.rc2 app/models/spree/base.rb
spree_core-3.5.0.rc1 app/models/spree/base.rb
spree_core-3.4.5 app/models/spree/base.rb
spree_core-3.4.4 app/models/spree/base.rb
spree_core-3.4.3 app/models/spree/base.rb
spree_core-3.4.2 app/models/spree/base.rb
spree_core-3.4.1 app/models/spree/base.rb
spree_core-3.4.0 app/models/spree/base.rb
spree_core-3.4.0.rc2 app/models/spree/base.rb