How to override ActiveRecord method for one Model
<p>I want to override, <code>last</code> method, for my class <code>Calculations</code>.</p>

<pre><code># app/models/calculations.rb
class Calculations &lt; ActiveRecord::Base
  def self.last
    console.info "Run my custom Calculations.last"
    order(:custom_field).limit(1).last
  end
end

1.9.3-p194 :001 &gt; Calculations.last
custom last
Calculations Load (0.1ms)  SELECT `calculations`.* FROM `calculations` ORDER BY calculations.created_at DESC LIMIT 1
=&gt; #&lt;Calculations date: "2016-01-13", direction: "order", ...&gt;

1.9.3-p194 :003 &gt; Calculations.where(nil).last
Calculations Load (45.1ms)  SELECT `calculations`.* FROM `calculations` ORDER BY `calculations`.`` DESC LIMIT 1
Mysql2::Error: Unknown column 'calculations.' in 'order clause': SELECT  `calculations`.* FROM `calculations`  ORDER BY `calculations`.`` DESC LIMIT 1
ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'calculations.' in 'order clause': SELECT  `calculations`.* FROM `calculations`  ORDER BY `calculations`.`` DESC LIMIT 1
</code></pre>

<p>First example called custom method.
Second called, AR original method.
What did I do wrong?</p>