The DmsfFileRevision.formatted_name method does no longer corrupt the argument 'format'.
This commit is contained in:
parent
c7b4e7e1a7
commit
7a66ce52a9
@ -257,13 +257,14 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
else
|
||||
filename = self.name
|
||||
end
|
||||
format.sub!('%t', self.title)
|
||||
format.sub!('%f', filename)
|
||||
format.sub!('%d', self.updated_at.strftime('%Y%m%d%H%M%S'))
|
||||
format.sub!('%v', self.version)
|
||||
format.sub!('%i', self.dmsf_file.id.to_s)
|
||||
format.sub!('%r', self.id.to_s)
|
||||
format + ext
|
||||
format2 = format.dup
|
||||
format2.sub!('%t', self.title)
|
||||
format2.sub!('%f', filename)
|
||||
format2.sub!('%d', self.updated_at.strftime('%Y%m%d%H%M%S'))
|
||||
format2.sub!('%v', self.version)
|
||||
format2.sub!('%i', self.dmsf_file.id.to_s)
|
||||
format2.sub!('%r', self.id.to_s)
|
||||
format2 + ext
|
||||
end
|
||||
|
||||
def self.create_digest(path)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user