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

Use module#prepend when available. #813

Merged
merged 1 commit into from
Mar 18, 2019
Merged

Conversation

unixmonkey
Copy link
Collaborator

In #810 It was discovered that version 1.2.0 was released with an issue that would result in a SystemStackError (stack level too deep).

I believe this has to do with the usage of alias_method_chain applied to ActionController::Base#render, which may also be tampered with by something else in the Gemfile.

And when `super_method` is also available, as it is used in `render_with_wicked_pdf` when there is no `alias_method_chain`.
@@ -5,20 +5,16 @@
class WickedPdf
if defined?(Rails.env)

if Rails::VERSION::MAJOR >= 5
if Rails::VERSION::MAJOR >= 4
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference between the Rails 4 and 5+ paths was :include vs prepend, so they were consolidated, and feature detection is now being used to determine whether to use :prepend or :include.

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.

1 participant