Sha256: 5939fa8a79ebf34b74747ff0432ee6db0ef0dad1f45bfb2f8d7e555013fb7242

Contents?: true

Size: 527 Bytes

Versions: 19

Compression:

Stored size: 527 Bytes

Contents

class Spree::Base < ActiveRecord::Base
  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.spree_base_scopes
    where(nil)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
spree_core-3.1.14 app/models/spree/base.rb
spree_core-3.1.13 app/models/spree/base.rb
spree_core-3.1.12 app/models/spree/base.rb
spree_core-3.1.11 app/models/spree/base.rb
spree_core-3.1.10 app/models/spree/base.rb
spree_core-3.1.9 app/models/spree/base.rb
spree_core-3.1.8 app/models/spree/base.rb
spree_core-3.1.7 app/models/spree/base.rb
spree_core-3.1.6 app/models/spree/base.rb
spree_core-3.1.5 app/models/spree/base.rb
spree_core-3.1.4 app/models/spree/base.rb
spree_core-3.1.3 app/models/spree/base.rb
spree_core-3.1.2 app/models/spree/base.rb
spree_core-3.1.1 app/models/spree/base.rb
spree_core-3.1.0 app/models/spree/base.rb
spree_core-3.1.0.rc4 app/models/spree/base.rb
spree_core-3.1.0.rc3 app/models/spree/base.rb
spree_core-3.1.0.rc2 app/models/spree/base.rb
spree_core-3.1.0.rc1 app/models/spree/base.rb