Patch #20507

ThemesHelper reopening ApplicationHelper is problem with autoloading

Added by Ondřej Ezr over 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Code cleanup/refactoring
Target version:3.2.0

Description

redmine/themes.rb defines ApplicationHelper, but it gets into problems, if there is a patch for it in plugin, which redefines ApplicationHelper method. Rails do not load it - it is loaded, but does not have the method defined. It works only if patch is after a controller invocation, because it load it by path and do not care if it is defined. But it bassically defines the model and avoiding Rails autoloading.

themes_helper.patch Magnifier (495 Bytes) Ondřej Ezr, 2015-08-11 01:58

Associated revisions

Revision 14511
Added by Jean-Philippe Lang over 3 years ago

ThemesHelper reopening ApplicationHelper is problem with autoloading (#20507).

Patch by Ondřej Ezr.

Revision 14520
Added by Jean-Philippe Lang over 3 years ago

Reverts r14510 (#20508) and r14511 (#20507), tests broken.

Revision 14695
Added by Jean-Philippe Lang about 3 years ago

Don't reopen ApplicationHelper (#20507).

History

#1 Updated by Jean-Philippe Lang over 3 years ago

  • Category set to Code cleanup/refactoring
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.2.0

Patch committed in r14511, thanks.

#2 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Closed to Reopened

#3 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF