Title: add increment! and decrement! methods · Issue #365 · hyperstack-org/hyperstack · GitHub
Open Graph Title: add increment! and decrement! methods · Issue #365 · hyperstack-org/hyperstack
X Title: add increment! and decrement! methods · Issue #365 · hyperstack-org/hyperstack
Description: these are active record methods: Implementation is simple: def increment!(attr) Hyperstack::Model.load { send(attr) }.then { |current_value| update(attr => current_value+1) } end if RUBY_ENGINE == 'opal' The above can be added to your Ap...
Open Graph Description: these are active record methods: Implementation is simple: def increment!(attr) Hyperstack::Model.load { send(attr) }.then { |current_value| update(attr => current_value+1) } end if RUBY_ENGINE == ...
X Description: these are active record methods: Implementation is simple: def increment!(attr) Hyperstack::Model.load { send(attr) }.then { |current_value| update(attr => current_value+1) } end if RUBY_ENGINE ...
Opengraph URL: https://github.com/hyperstack-org/hyperstack/issues/365
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"add increment! and decrement! methods","articleBody":"these are active record methods:\r\n\r\nImplementation is simple:\r\n\r\n```ruby\r\n def increment!(attr)\r\n Hyperstack::Model.load { send(attr) }.then { |current_value| update(attr =\u003e current_value+1) }\r\n end if RUBY_ENGINE == 'opal'\r\n```\r\n\r\nThe above can be added to your ApplicationRecord.rb file for now","author":{"url":"https://github.com/catmando","@type":"Person","name":"catmando"},"datePublished":"2021-02-26T07:21:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/365/hyperstack/issues/365"}
| 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:3846888e-9316-f5dd-994d-7180c8815964 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9684:DDB35:16F6AE4:1D25A56:699183AA |
| html-safe-nonce | e24cefb9b7d22372d574f87ac3c4ed78abbbcb348607adf41929c1f7167d0ff1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Njg0OkREQjM1OjE2RjZBRTQ6MUQyNUE1Njo2OTkxODNBQSIsInZpc2l0b3JfaWQiOiI1NDU4NjY4MTYwOTczNjM2NTIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6657903dbc9f3ea5ab13b0c2b83b4fe3c97ac9981990015d92b9f106c4dfb860 |
| hovercard-subject-tag | issue:817111514 |
| 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/365/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7256b476998a1b4ec99f8b368c164548be6a3518002098cbdc8693cdde8cee5/hyperstack-org/hyperstack/issues/365 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7256b476998a1b4ec99f8b368c164548be6a3518002098cbdc8693cdde8cee5/hyperstack-org/hyperstack/issues/365 |
| og:image:alt | these are active record methods: Implementation is simple: def increment!(attr) Hyperstack::Model.load { send(attr) }.then { |current_value| update(attr => current_value+1) } end if RUBY_ENGINE == ... |
| 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