We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b7d676 commit 1bf82b2Copy full SHA for 1bf82b2
activerecord/test/models/post.rb
@@ -1,7 +1,7 @@
1
class Post < ActiveRecord::Base
2
named_scope :with_type_self, lambda{{:conditions => ["type=?", self.name]}}
3
named_scope :containing_the_letter_a, :conditions => "body LIKE '%a%'"
4
- named_scope :ranked_by_comments, :order => "comments_count DESC"
+ named_scope :ranked_by_comments, :order => "comments_count DESC, id DESC"
5
named_scope :limit, lambda {|limit| {:limit => limit} }
6
named_scope :with_authors_at_address, lambda { |address| {
7
:conditions => [ 'authors.author_address_id = ?', address.id ],
0 commit comments