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

Updated . Posted . Visible to the public.

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

This has been fixed in Rails 3+.

Henning Koch
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2012-11-21 08:58)