Title: Models should use pluralize when computing inverse names · Issue #88 · hyperstack-org/hyperstack · GitHub
Open Graph Title: Models should use pluralize when computing inverse names · Issue #88 · hyperstack-org/hyperstack
X Title: Models should use pluralize when computing inverse names · Issue #88 · hyperstack-org/hyperstack
Description: Not simplistic removal of s from end of name. Good test is has_many :criteria this should fix it: module ActiveRecord module Associations class AssociationReflection def initialize(owner_class, macro, name, options = {}) owner_class.refl...
Open Graph Description: Not simplistic removal of s from end of name. Good test is has_many :criteria this should fix it: module ActiveRecord module Associations class AssociationReflection def initialize(owner_class, mac...
X Description: Not simplistic removal of s from end of name. Good test is has_many :criteria this should fix it: module ActiveRecord module Associations class AssociationReflection def initialize(owner_class, mac...
Opengraph URL: https://github.com/hyperstack-org/hyperstack/issues/88
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Models should use pluralize when computing inverse names","articleBody":"Not simplistic removal of s from end of name.\r\n\r\nGood test is `has_many :criteria`\r\n\r\nthis should fix it:\r\n\r\n```ruby\r\nmodule ActiveRecord\r\n module Associations\r\n class AssociationReflection\r\n def initialize(owner_class, macro, name, options = {})\r\n owner_class.reflect_on_all_associations \u003c\u003c self\r\n @owner_class = owner_class\r\n @macro = macro\r\n @options = options\r\n @klass_name = options[:class_name] || (collection? \u0026\u0026 name.camelize.singularize) || name.camelize\r\n @association_foreign_key = options[:foreign_key] || (macro == :belongs_to \u0026\u0026 \"#{name}_id\") || \"#{@owner_class.name.underscore}_id\"\r\n @source = options[:source] || @klass_name.underscore if options[:through]\r\n @attribute = name\r\n end\r\n end\r\nend\r\n```\r\n","author":{"url":"https://github.com/catmando","@type":"Person","name":"catmando"},"datePublished":"2018-12-11T16:52:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/88/hyperstack/issues/88"}
| 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:579a3762-34a5-47ba-1340-ac621bc2a5f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECD2:30050E:213916:29D996:69920BE0 |
| html-safe-nonce | 1515f86429eaebb3c17a9b30ed8163241cb87edc53e414db73132030f7f3c1f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0QyOjMwMDUwRToyMTM5MTY6MjlEOTk2OjY5OTIwQkUwIiwidmlzaXRvcl9pZCI6IjgzNjY5MDQ0MzI1MTI4NjMyMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dcce7ce9b05c7bf8b7122185c3ad5425726754821c5775f7112d0a916338bd34 |
| hovercard-subject-tag | issue:389857704 |
| 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/88/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e064539d33530e725bf177cc24412654816e7d7d057cf2f864c02db96b515e67/hyperstack-org/hyperstack/issues/88 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e064539d33530e725bf177cc24412654816e7d7d057cf2f864c02db96b515e67/hyperstack-org/hyperstack/issues/88 |
| og:image:alt | Not simplistic removal of s from end of name. Good test is has_many :criteria this should fix it: module ActiveRecord module Associations class AssociationReflection def initialize(owner_class, mac... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | catmando |
| 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