Sha256: f4fabee30d134d140f15ea41cd900a365983364482a95242ab53a03b5857144e

Contents?: true

Size: 343 Bytes

Versions: 11

Compression:

Stored size: 343 Bytes

Contents

require 'active_model'

class CacheKeyHelper
  include ActiveModel::Model
  include Gris::CacheKey

  attr_accessor :id

  def new_record?
    id.nil?
  end

  class << self
    def find(id)
      CacheKeyHelper.new(id: id)
    end

    def model_name
      CacheKeyHelper
    end

    def cache_key
      'cache_key_helper'
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gris-0.3.8 spec/support/cache_key_helper.rb
gris-0.3.7 spec/support/cache_key_helper.rb
gris-0.3.6 spec/support/cache_key_helper.rb
gris-0.3.4 spec/support/cache_key_helper.rb
gris-0.3.3 spec/support/cache_key_helper.rb
gris-0.3.2 spec/support/cache_key_helper.rb
gris-0.3.1 spec/support/cache_key_helper.rb
gris-0.3.0 spec/support/cache_key_helper.rb
gris-0.2.4 spec/support/cache_key_helper.rb
gris-0.2.3 spec/support/cache_key_helper.rb
gris-0.2.2 spec/support/cache_key_helper.rb