-
Notifications
You must be signed in to change notification settings - Fork 121
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
A lot of same requests after new reader creating #79
Comments
Hm, the two SQL queries (DELETE + INSERT) are from #setup_new_reader, which is executed as a callback for after_create. Maybe there is a class loading issue in your app? It seems to me that the |
No, |
Didn't see this before. Do you have any more background info about the issue? What Rails version? In production or in development env? |
Don’t care if `.acts_as_reader` or `.acts_as_readable` is called multiple times. Belongs to #79
@ytrrty Please checkout my latest commit. Does this help? |
Should be fixed by 4b744fa |
After creating reader (user), I getting a lot of same requests. It's creating and deleting read_mark about 18 times.
SQL (6.7ms) DELETE FROM "read_marks" WHERE "read_marks"."reader_id" = $1 AND "read_marks"."reader_type" = $2 AND "read_marks"."readable_type" = $3 [["reader_id", 50763], ["reader_type", "User"], ["readable_type", "Event"]]
SQL (11.9ms) INSERT INTO "read_marks" ("reader_id", "reader_type", "readable_type", "timestamp") VALUES ($1, $2, $3, $4) RETURNING "id" [["reader_id", 50763], ["reader_type", "User"], ["readable_type", "Event"], ["timestamp", "2016-09-14 13:12:51.715057"]]
The text was updated successfully, but these errors were encountered: