Skip to content
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

[rails6] Use relative paths for layouts #7574

Merged

Conversation

NickLaMuro
Copy link
Member

@NickLaMuro NickLaMuro commented Jan 12, 2021

Fixes the following Deprecation warnings:

DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
(called from render_pdf_internal_rr at /home/travis/build/ManageIQ/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:47)

DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
(called from print_report at /Users/nicklamuro/code/redhat/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:124)

DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
(called from set_summary_pdf_data at /home/travis/build/ManageIQ/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:234)

Caused by the Rails 6.0 Upgrade

Note for reviewers

The specs that are fixed here are not the only specs that are exercising this code, just the specs that check for method arguments to be exact, and fail after the changes to the app/controllers/** code. There are plenty of tests calling this code causing the original deprecation warnings:

https://travis-ci.com/github/ManageIQ/manageiq-ui-classic/jobs/470572340#L2105-L2135

So my guess would be that this is probably a safe change, though it wouldn't hurt to have someone who knows better where this layout is used on a screen to confirm.

Links

@NickLaMuro NickLaMuro force-pushed the rails-6-use-relative-paths-for-layouts branch from 5c54c66 to 9b25a97 Compare January 12, 2021 22:31
@himdel himdel closed this Jan 14, 2021
@himdel himdel reopened this Jan 14, 2021
@NickLaMuro NickLaMuro force-pushed the rails-6-use-relative-paths-for-layouts branch 2 times, most recently from 7bc19c2 to b934fb2 Compare January 20, 2021 17:42
Fixes the following Deprecation warnings:

  DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
  (called from render_pdf_internal_rr at /home/travis/build/ManageIQ/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:47)

  DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
  (called from print_report at /Users/nicklamuro/code/redhat/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:124)

  DEPRECATION WARNING: Rendering layouts from an absolute path is deprecated.
  (called from set_summary_pdf_data at /home/travis/build/ManageIQ/manageiq-ui-classic/app/controllers/application_controller/report_downloads.rb:234)

Caused by the Rails 6.0 Upgrade
@NickLaMuro NickLaMuro force-pushed the rails-6-use-relative-paths-for-layouts branch from b934fb2 to d2f1b4f Compare January 26, 2021 22:13
@miq-bot
Copy link
Member

miq-bot commented Jan 26, 2021

Checked commit NickLaMuro@d2f1b4f with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
3 files checked, 0 offenses detected
Everything looks fine. 👍

@h-kataria h-kataria merged commit 95e1857 into ManageIQ:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants