Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL-Query on every update (even without Changes) #1128

Open
Skulli opened this issue Jul 25, 2024 · 0 comments
Open

SQL-Query on every update (even without Changes) #1128

Skulli opened this issue Jul 25, 2024 · 0 comments

Comments

@Skulli
Copy link

Skulli commented Jul 25, 2024

Take any model with acts_as_taggable_on in it, like a User

> user = User.first
> user.save
> ActsAsTaggableOn::Tagging Load (0.3ms)  SELECT "taggings".* FROM "taggings" WHERE "taggings"."taggable_id" = $1 AND "taggings"."taggable_type" = $2  [["taggable_id", 1], ["taggable_type", "User"]]

Is there a way to prevent this? I checked the gem-code and found 2 after_save-Callbacks, but when i triggered those by hand, the sql-query was different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant