Flowdock
method

last

Importance_1
v2.2.1 - Show latest stable - 1 note - Class: ActiveRecord::Base
last(*args) public

A convenience wrapper for find(:last, *args). You can pass in all the same arguments to this method as you can to find(:last).

Show source
Register or log in to add new notes.
August 21, 2008 - (v2.1.0)
0 thanks

Calling 'last' on a has_many assoication where the order is specified as a symbol raises an error.

Calling ‘last’ on a has_many assoication where the order is specified as a symbol raises an error. If you use :order, the value must be a string and not a symbol. (Prior to 2.1, :order would accept a string).

There is an incomplete Lighthouse ticket for this at http://rails.lighthouseapp.com/projects/8994/tickets/341-calling-last-on-a-has_many-assoication-where-the-order-is-specified-as-a-symbol-raises-an-error#ticket-341-1