title: Papertrail 10.2.1 undefined method `timestamp_sort_order' for Class
body: <p>I am using paper_trail (<a href="https://github.com/paper-trail-gem/paper_trail" rel="nofollow noreferrer">https://github.com/paper-trail-gem/paper_trail</a>) in My Rails 5.2.1 and Ruby 2.5.1. My Model and controller Contains Following code</p>
  
  <pre><code>class ModelName &lt; ApplicationRecord    
     has_paper_trail versions: { class_name: "History" }, ignore:  [:updated_at] 
  end
  
  class ApplicationController &lt; ActionController::Base
     before_action :set_paper_trail_whodunnit
     def current_user
       if !(@current_user)
         @current_user = current_user_session &amp;&amp; current_user_session.user
      end
      return @current_user
    end
  end
  </code></pre>
  
  <p>When I am trying to save record of particular model it gives</p>
  
  <pre><code> undefined method `timestamp_sort_order' for &lt;Class&gt;
  </code></pre>
  
  <p>I have tried this solution <a href="https://stackoverflow.com/questions/31716983/nomethoderror-undefined-method-timestamp-sort-order-for-paper-trail-issue-af">NoMethodError - undefined method `timestamp_sort_order&#39; for Paper trail issue after upgrading Rails 4.2</a> 
  but still it is not working.</p>
  
  <p>I inspected the paper trail gem and found that this method is class level method and it is not available in my <code>History</code> Model.</p>
  
  <p>PS: I am using authlogic (<a href="https://github.com/binarylogic/authlogic" rel="nofollow noreferrer">https://github.com/binarylogic/authlogic</a>) for authentication.</p>