comparison app/models/attachment.rb @ 1051:ef882e222003 bibplugin_bibtex

Changing the way the bibtex is parsed: uses link_to_remote instead of remote_form_for; using RJS; created tab helper (still not implemented correctly in terms of views
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 16 Nov 2012 19:05:01 +0000
parents cbb26bc654de
children
comparison
equal deleted inserted replaced
1043:8cfa9b743559 1051:ef882e222003
67 end 67 end
68 self.filesize = @temp_file.size 68 self.filesize = @temp_file.size
69 end 69 end
70 end 70 end
71 end 71 end
72 72
73 def file 73 def file
74 nil 74 nil
75 end 75 end
76 76
77 # Copies the temporary file to its final location 77 # Copies the temporary file to its final location
166 end 166 end
167 {:files => attached, :unsaved => obj.unsaved_attachments} 167 {:files => attached, :unsaved => obj.unsaved_attachments}
168 end 168 end
169 169
170 def self.latest_attach(attachments, filename) 170 def self.latest_attach(attachments, filename)
171 attachments.sort_by(&:created_on).reverse.detect { 171 attachments.sort_by(&:created_on).reverse.detect {
172 |att| att.filename.downcase == filename.downcase 172 |att| att.filename.downcase == filename.downcase
173 } 173 }
174 end 174 end
175 175
176 private 176 private