Read more

Rails 2: Calling instance_eval on a scope will trigger a database query

Henning Koch
November 21, 2012Software engineer at makandra GmbH

In Rails 2, when calling instance_eval or instance_exec on a scope, the scope will fetch its records from the database.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This has been fixed in Rails 3+.

Posted by Henning Koch to makandra dev (2012-11-21 09:58)