Sha256: 710a945ec2d28557b95e16d21044dad5210cae97c038006cb7882d0922ad008b

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 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

  mattr_accessor :belongs_to_required_by_default, instance_accessor: false do
    false
  end

  def self.spree_base_scopes
    where(nil)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_core-3.4.0.rc1 app/models/spree/base.rb