Title: collection << item returns incorrect collection.count · Issue #138 · hyperstack-org/hyperstack · GitHub
Open Graph Title: collection << item returns incorrect collection.count · Issue #138 · hyperstack-org/hyperstack
X Title: collection << item returns incorrect collection.count · Issue #138 · hyperstack-org/hyperstack
Description: In poly-assoc3 branch: class ExerciseType < ApplicationRecord has_many :exercise_types_user has_many :users, through: :exercise_types_user end class User < ApplicationRecord has_many :exercise_types_user has_many :exercise_types, through...
Open Graph Description: In poly-assoc3 branch: class ExerciseType < ApplicationRecord has_many :exercise_types_user has_many :users, through: :exercise_types_user end class User < ApplicationRecord has_many :exercise_type...
X Description: In poly-assoc3 branch: class ExerciseType < ApplicationRecord has_many :exercise_types_user has_many :users, through: :exercise_types_user end class User < ApplicationRecord has_many :exercis...
Opengraph URL: https://github.com/hyperstack-org/hyperstack/issues/138
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"collection \u003c\u003c item returns incorrect collection.count","articleBody":"In `poly-assoc3` branch:\r\n\r\n```\r\nclass ExerciseType \u003c ApplicationRecord\r\n has_many :exercise_types_user\r\n has_many :users, through: :exercise_types_user\r\nend\r\n\r\nclass User \u003c ApplicationRecord\r\n has_many :exercise_types_user\r\n has_many :exercise_types, through: :exercise_types_user\r\nend\r\n\r\nclass ExerciseTypesUser \u003c ApplicationRecord\r\n belongs_to :user\r\n belongs_to :exercise_type\r\nend\r\n\r\n# works perfectly:\r\nuser.exercise_types \u003c\u003c exercise_type\r\n\r\n# but here is the bug..\r\nexercise_types.users.count\r\n# returns a number higher than count + 1\r\n# fine after a page refresh, so its just the client count which is not being updated correctly\r\n```","author":{"url":"https://github.com/barriehadfield","@type":"Person","name":"barriehadfield"},"datePublished":"2019-03-17T05:30:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/138/hyperstack/issues/138"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e9e6461f-83f2-5d11-e000-086af03371a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF84:13A543:25E32D7:30225CD:6991B932 |
| html-safe-nonce | 8a9711e86900246a08ec53c89c89dbd251f2c435170e432de9e779e4848002c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjg0OjEzQTU0MzoyNUUzMkQ3OjMwMjI1Q0Q6Njk5MUI5MzIiLCJ2aXNpdG9yX2lkIjoiMjQxOTg5Mjg3ODIzMjg5Mzc0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b5b1e675736bb9b72ed8fc82b787897301fa85bfc4a9976c5904c7808ec33ff6 |
| hovercard-subject-tag | issue:421884253 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hyperstack-org/hyperstack/138/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e139f6342190e1482f64ed98afe694650445db4b3abf4cb69c48ac9f7e0768a/hyperstack-org/hyperstack/issues/138 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e139f6342190e1482f64ed98afe694650445db4b3abf4cb69c48ac9f7e0768a/hyperstack-org/hyperstack/issues/138 |
| og:image:alt | In poly-assoc3 branch: class ExerciseType < ApplicationRecord has_many :exercise_types_user has_many :users, through: :exercise_types_user end class User < ApplicationRecord has_many :exercise_type... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | barriehadfield |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/hyperstack-org/hyperstack git https://github.com/hyperstack-org/hyperstack.git |
| octolytics-dimension-user_id | 34562730 |
| octolytics-dimension-user_login | hyperstack-org |
| octolytics-dimension-repository_id | 145879576 |
| octolytics-dimension-repository_nwo | hyperstack-org/hyperstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145879576 |
| octolytics-dimension-repository_network_root_nwo | hyperstack-org/hyperstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width