Call Montréal, Canada 524-949-6869

Blog

Saturday, September 11, 2010

How to get the options for a named_scope

class Video < ActiveRecord::Base
  named_scope :highest_scores, :order => "score DESC, id"
end

Video.highest_scores.proxy_options # => {:order=>"score DESC, id"}

Developing Ruby on Rails applications and custom Content Management Systems in Montréal. Contact Firsthand.