Rails 6 Upgrade Part X: template & sources not template.source
#2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Story So Far
We have been trying to upgrade
sbnto Rails 6. On the last attempt, we were seeing a template error. Here it is:SENTRY ERROR
I haven't been able to find anything the specifically references this problem when upgrading to Rails 6, but there is a deprecation warning about
ActionView::Templatewhen starting upsbnon therails-6branch. No definitive answers, but close. Here's theDEPRECATION WARNING
Purpose
So, I'm trying to resolve the DEPRECATION WARNING with this PR.
I got here by reading a github issue and looked at the related pull request. I've link to those here, but it was mostly find the place to make the change suggested. It was all in the DEPRECATION WARNING message, but I had to decipher / read it.
Changes
prototype-rails/lib/action_view/template/handlers/rjs.rbthat maps toActionView::Template::Handlers::RJS.calltocall(template, source).sourceinstead oftemplate.source- this seems like a reasonable thing to do.Strangeness
6.1.1, which is higher thansbnwhich is at6.0.3.7.OUTCOME
Merging this, which will roll the version of the gem to 4.2.0, will update sbn gemfile to use new version.