This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal < ActiveRecord::Base | |
named_scope :with_wings, :conditions => {:wings => true} | |
named_scope :with_four_legs, :conditions => {:legs => 4} | |
# Returns object ids falling within current scope without | |
# instantiating actual model objects | |
def self.ids | |
column = columns_hash[primary_key] | |
ids = connection.select_all(construct_finder_sql(:select => primary_key)).collect do |value| |
NewerOlder