Obie shows a very cool way to handle ActiveRecord loading an Association Proxy. By overriding the loaded? method, you can include business logic to automatically return true that the proxy was loaded instead of hitting the database.

Obie uses the example of not creating the association proxy for a neighborhood when the population of the city is under 50,000.

Technorati Tags:


SPEAK / ADD YOUR COMMENT
Comments are moderated.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top