Sha256: 127f0fa7fbe2097e636a1c4508b7ae2413ee8d632e41eea48b3a93a309ff8cbc

Contents?: true

Size: 300 Bytes

Versions: 2

Compression:

Stored size: 300 Bytes

Contents

class ColorVariation < ActiveRecord::Base
  belongs_to :product

  def slow_method
    Product.order("updated_at").first.updated_at
  end

  def slow_method_with_product
    product.updated_at
  end

  def self.slow_class_method
    "#{Product.order("updated_at").first.updated_at}#{rand}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qor_cache-0.0.4 test/dummy/app/models/color_variation.rb
qor_cache-0.0.3 test/dummy/app/models/color_variation.rb