Sha256: 413b6f5ac25853ea8edbeb8e1e58f1791981fa1bb2c734437422cdcda46f022b

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

class ColorVariation < ActiveRecord::Base
  attr_accessible :code, :name, :product_code
  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.2 test/dummy/app/models/color_variation.rb
qor_cache-0.0.1 test/dummy/app/models/color_variation.rb