mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Prefer object.cache_key when available.
This commit is contained in:
10
test/fixtures/poro.rb
vendored
10
test/fixtures/poro.rb
vendored
@@ -1,6 +1,8 @@
|
||||
verbose = $VERBOSE
|
||||
$VERBOSE = nil
|
||||
class Model < ActiveModelSerializers::Model
|
||||
FILE_DIGEST = Digest::MD5.hexdigest(File.open(__FILE__).read)
|
||||
|
||||
### Helper methods, not required to be serializable
|
||||
|
||||
# Convenience when not adding @attributes readers and writers
|
||||
@@ -52,13 +54,7 @@ Post = Class.new(Model)
|
||||
Like = Class.new(Model)
|
||||
Author = Class.new(Model)
|
||||
Bio = Class.new(Model)
|
||||
Blog = Class.new(Model) do
|
||||
FILE_DIGEST = Digest::MD5.hexdigest(File.open(__FILE__).read)
|
||||
|
||||
def digest
|
||||
FILE_DIGEST
|
||||
end
|
||||
end
|
||||
Blog = Class.new(Model)
|
||||
Role = Class.new(Model)
|
||||
User = Class.new(Model)
|
||||
Location = Class.new(Model)
|
||||
|
||||
Reference in New Issue
Block a user