You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
When I now visit the index action (has a raise "test" in it so it does nothing), I see in my rails sql log:
User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", "17"]]
Customer Load (27.0ms) SELECT "customers".* FROM "customers" WHERE "customers"."account_id" = 17
As you can see the it loads all customers of the current account, which is really bad for performance. Shouldn't it by default load anything but only create a scope and store this in @customers?
Using rails 3.1.0.rc4 and cancan 1.6.5. My controller contains a simple
When I now visit the index action (has a raise "test" in it so it does nothing), I see in my rails sql log:
As you can see the it loads all customers of the current account, which is really bad for performance. Shouldn't it by default load anything but only create a scope and store this in @customers?