Skip to content

Commit

Permalink
Dropping unnecessary secondary sort on versions association, fix #235
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Atkins committed Jun 18, 2013
1 parent e1d590f commit e76fb27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paper_trail/has_paper_trail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def has_paper_trail(options = {})
attr_accessor :paper_trail_event

has_many self.versions_association_name,
lambda { |_model| order("#{PaperTrail.timestamp_field} ASC", "#{_model.class.version_key} ASC") },
lambda { |_model| order("#{PaperTrail.timestamp_field} ASC") },
:class_name => self.version_class_name, :as => :item

after_create :record_create, :if => :save_version? if !options[:on] || options[:on].include?(:create)
Expand Down

0 comments on commit e76fb27

Please sign in to comment.