Forum: Ruby on Rails How to override AR last method for one class

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D143eefafa1a871a5f59864fad60a99a?d=identicon&s=25 илья л-п (Guest)
on 2016-01-20 21:28
(Received via mailing list)
I have Calculations class. It's mysql view.
I want to get last record by:

> def self.last
>   order(:custom_field).limit(1)
> end

 It's work for Calculations.last
But don't for Calculations.prepayed.last with err:
This topic is locked and can not be replied to.