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

Fixes side effects with application_controller_patch #57

Conversation

liaham
Copy link
Contributor

@liaham liaham commented Jan 27, 2023

Hi,

I observed some strange side effects with your latest changes by adding the application_controller_patch.rb.

The problem occurs due to requiring ApplicationController:

# frozen_string_literal: true

require 'application_controller' # <-- !Problem is here!

module MessageCustomize
  module ApplicationControllerPatch
   ...
  end
end

It only happens under certain circumstances (see xmera Circle issue 1444).

Since the code runs even without the requirement above I deleted the line in redmine_message_customize/lib/message_customize/application_controller_patch.rb.

It would be great when you could merge this change.

Thank you! :)

Best Regards,

@liaham

Requiring ApplicationController:

`require 'application_controller`

may lead to side effects under certain circumstances (see xmera Circle
issue 1444).

Since the code runs even without the requirement above in
redmine_message_customize/lib/message_customize/application_controller_patch.rb
the line is deleted.
@ishikawa999
Copy link
Collaborator

@liaham
Thank you for the pull request.
It seems to work fine, so we will merge it in.

@ishikawa999 ishikawa999 merged commit a97570b into farend:master Jan 30, 2023
@ishikawa999
Copy link
Collaborator

I have created a new release that includes this change.
https://github.com/farend/redmine_message_customize/releases/tag/v0.1.7

@liaham
Copy link
Contributor Author

liaham commented Jan 30, 2023

Many thanks!

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