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-4.0.9 app/models/spree/base.rb
spree_core-4.1.15 app/models/spree/base.rb
spree_core-4.1.14 app/models/spree/base.rb
spree_core-4.0.8 app/models/spree/base.rb
spree_core-3.7.14.1 app/models/spree/base.rb
spree_core-4.1.13.1 app/models/spree/base.rb
spree_core-4.0.7.1 app/models/spree/base.rb
spree_core-4.0.7 app/models/spree/base.rb
spree_core-3.7.14 app/models/spree/base.rb
spree_core-4.1.13 app/models/spree/base.rb
spree_core-4.0.6 app/models/spree/base.rb
spree_core-4.2.0.rc2 app/models/spree/base.rb
spree_core-3.7.13 app/models/spree/base.rb
spree_core-4.0.5 app/models/spree/base.rb
spree_core-4.1.12 app/models/spree/base.rb
spree_core-3.7.12 app/models/spree/base.rb
spree_core-4.2.0.rc1 app/models/spree/base.rb
spree_core-4.0.4 app/models/spree/base.rb
spree_core-3.7.11 app/models/spree/base.rb
spree_core-4.1.11 app/models/spree/base.rb