Bojan Mihelac
2006-Jul-12 15:56 UTC
[Rails] Is it possible to reload all ActiveRecord objects
Hi all, I wander if it is possible to force reload of all ActiveRecord object''s of some class that are already loaded, something like Book.reload_all? I know that I am able to reload specific objects with reload method but I would like to reload all that are currently in memory. thanks in advance, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org
Jeffrey Hardy
2006-Jul-13 02:07 UTC
[Rails] Is it possible to reload all ActiveRecord objects
On 12-Jul-06, at 11:54 AM, Bojan Mihelac wrote:> I wander if it is possible to force reload of all ActiveRecord > object''s of some class that are already loaded, something like > Book.reload_all?If you''re using the console, you can use reload! -- not sure about elsewhere, though. /Jeff -- http://re.visioni.st http://quotedprintable.com