Sha256: f3ae0379b7e3c734e94f16b9e418e438d62ffb33c979efb68b42161dd5f5b067
Contents?: true
Size: 380 Bytes
Versions: 7
Compression:
Stored size: 380 Bytes
Contents
module EnjuOai module OaiModel extend ActiveSupport::Concern module ClassMethods def find_by_oai_identifier(identifier) self.find(identifier.to_s.split(":").last.split("-").last) end end def oai_identifier "oai:#{::Addressable::URI.parse(LibraryGroup.site_config.url).host}:#{self.class.to_s.tableize}-#{self.id}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems