app/models/esr_file.rb in vesr-0.12.5 vs app/models/esr_file.rb in vesr-0.12.6
- old
+ new
@@ -1,10 +1,14 @@
class EsrFile < ActiveRecord::Base
+ # Default sorting
+ default_scope order('created_at DESC')
+
# File upload
mount_uploader :file, EsrFileUploader
has_many :esr_records, :dependent => :destroy
+ # String
def to_s(format = :default)
case format
when :long
s = ''
esr_records.each {|record|