app/models/concerns/blacklight/document.rb in blacklight-6.5.0 vs app/models/concerns/blacklight/document.rb in blacklight-6.6.0
- old
+ new
@@ -86,13 +86,11 @@
end
end
end
alias has_field? has?
- def key? k
- _source.key? k
- end
+ delegate :key?, to: :_source
alias has_key? key?
def fetch key, *default
if key? key
self[key]
@@ -127,20 +125,17 @@
end
# Certain class-level methods needed for the document-specific
# extendability architecture
module ClassMethods
-
attr_writer :unique_key
def unique_key
@unique_key ||= 'id'
end
-
end
private
def _source_responds_to? *args
_source && self != _source && _source.respond_to?(*args)
end
-
end