Sonia Hamilton wrote:
> My question is: if I subclass a model, how do I limit the records 
> retrieved in the subclass?

I think The Rails Way to do this is to use a named scope, and not a 
subclass.  Eg:



class Location < ActiveRecord::Base

   named_scope :inner_city, :conditions => {:postcode => 2000}

end



@suburbs = Location.inner_city.find(:all, ...)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to