We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96ba302 commit d3529cdCopy full SHA for d3529cd
app/models/apis_identifier.rb
@@ -55,10 +55,7 @@ def self.collection_names_hash
55
# - temporary identifier name
56
def self.next_temporary_identifier(apis_collection)
57
year = Time.now.year
58
- latest = self.find(:all,
59
- :conditions => ["name like ?", "papyri.info/#{self::IDENTIFIER_NAMESPACE}/#{apis_collection}.apis.#{year}-%"],
60
- :order => "name DESC",
61
- :limit => 1).first
+ latest = self.where('name like ?', "papyri.info/#{self::IDENTIFIER_NAMESPACE}/#{apis_collection}.apis.#{year}-%").order(name: :desc).limit(1).first
62
if latest.nil?
63
# no constructed id's for this year/class
64
document_number = 1
0 commit comments