Flowdock
method

find_last

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::Base
find_last(options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/base.rb, line 1306
        def find_last(options)
          order = options[:order]

          if order
            order = reverse_sql_order(order)
          elsif !scoped?(:find, :order)
            order = "#{table_name}.#{primary_key} DESC"
          end

          if scoped?(:find, :order)
            scoped_order = reverse_sql_order(scope(:find, :order))
            scoped_methods.select { |s| s[:find].update(:order => scoped_order) }
          end

          find_initial(options.merge({ :order => order }))
        end
Register or log in to add new notes.