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"}

Please note this blog is no longer maintained. Please visit CivilCode Inc - Custom Software Development.