Skip to content

Comments

Require needed ActiveSupport core extensions#283

Merged
marcoroth merged 1 commit intomainfrom
require-activesupport-methods
Jul 12, 2023
Merged

Require needed ActiveSupport core extensions#283
marcoroth merged 1 commit intomainfrom
require-activesupport-methods

Conversation

@marcoroth
Copy link
Member

Type of PR

Enhancement

Description

When using the CableReady gem (or the cable_ready-element gem to be specific) outside of a Rails context it was complaining about undefined methods for:

NoMethodError: undefined method `seconds' for 0.1:Float
    rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cable_ready-5.0.1/lib/cable_ready/config.rb:31:in `initialize'

and

NoMethodError: undefined method `many?' for [{:message=>"Test"}]:Array
    rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cable_ready-5.0.1/lib/cable_ready/operation_builder.rb:41:in `block in add_operation_method'

Requiring the right ActiveSupport core extensions resolves those errors.

Why should this be added

This makes the gem more portable and less Rails-dependent.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@netlify
Copy link

netlify bot commented Jul 12, 2023

Deploy Preview for cableready ready!

Name Link
🔨 Latest commit 525d91a
🔍 Latest deploy log https://app.netlify.com/sites/cableready/deploys/64aea3ed214378000878ec15
😎 Deploy Preview https://deploy-preview-283--cableready.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marcoroth marcoroth merged commit 2c2ec26 into main Jul 12, 2023
@marcoroth marcoroth deleted the require-activesupport-methods branch July 12, 2023 13:10
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

Successfully merging this pull request may close these issues.

2 participants