-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update canonical-rails syntax for latest version #3865
Conversation
Thanks, I created jumph4x/canonical-rails#65 to avoid backporting this to old Solidus versions. I think we should wait for their next release if this is accepted. cc @jumph4x |
@kennyadsl I like your solution even better! |
@brchristian they are both needed otherwise we'll have a deprecation warning here! Thanks! |
I see! |
Thank you for the contribution. I'll cut a patch version release to make sure existing Gemfiles will continue working. Sorry for breaking it! |
canonical-rails introduced a breaking change in 0.2.10 which is causing some Solidus problems on master. solidusio/solidus#3865
canonical-rails introduced a breaking change in 0.2.10 which is causing some Solidus problems on master. solidusio/solidus#3865
canonical-rails introduced a breaking change in 0.2.10 which is causing some Solidus problems on master. solidusio/solidus#3865
canonical-rails introduced a breaking change in 0.2.10 which is causing some Solidus problems on master. solidusio/solidus#3865
nice. My bad for not adding deprecations. Thank @kennyadsl for fixing that! |
This is good to go right? Would love to start new project on Rails 6.1 / Solidus master ;) So let me know if there is anything I can do to move this forward. |
@@ -24,7 +24,7 @@ Gem::Specification.new do |s| | |||
s.add_dependency 'solidus_api', s.version | |||
s.add_dependency 'solidus_core', s.version | |||
|
|||
s.add_dependency 'canonical-rails', '~> 0.2.0' | |||
s.add_dependency 'canonical-rails', '~> 0.2.10' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably revert this gemspec change now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR moves from the deprecated whitelisted_params
to the new allowed_params
, which works in 0.2.10 and 0.2.11, so I think that we are going to want something to lock the version at 0.2.10 or 0.2.11 in order to ensure compatibility. The allowed_params
method is not compatible with 0.2.9 and lower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you are totally right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brchristian thank you, and thanks also to @kennyadsl for his PR on canonical-rails
!
Can we merge this? Or waiting for the backport? |
Description
canonical-rails version 0.2.10 changed the method
whitelisted_parameters
toallowed_parameters
. (See https://github.com/jumph4x/canonical-rails/pull/58/files.)Any user running
bundle update
and going from version <= 0.2.9 to 0.2.10 will fail to compile their asset pipeline, resulting in the errorNoMethodError: undefined method 'whitelisted_parameters=' for CanonicalRails:Module
.This updates to the current syntax, and also sets the dependency at 0.2.10 to prevent any incompatibility issues that might arise from using the new
allowed_parameters
with old versions that still expectwhitelisted_parameters
.Checklist: