プロジェクト

全般

プロフィール

Vote #72449

完了

Can't override mailer views inside redmine plugin.

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
54
issue_org_id:
11776
author_id:
51223
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
52
ステータス-->[Closed]

説明

You can't override mailer views as you can other views from within a redmine plugin.

I suspect the cause of the problem is inside /lib/redmine/plugin.rb line 83:-
http://www.redmine.org/projects/redmine/repository/entry/trunk/lib/redmine/plugin.rb

      if File.directory?(view_path)
        ActionController::Base.prepend_view_path(view_path)
      end

Should be:-

      if File.directory?(view_path)
        ActionController::Base.prepend_view_path(view_path)
        ActionMailer::Base.prepend_view_path(view_path)
      end

Because otherwise, as ActionMailer and ActionController inherit from the same class (AbstractController), any extra view path given to the ActionController won't be available to the ActionMailer.

Redmine version: 2.0.3.stable.10173 but it seems to have not been fixed yet in trunk too.


journals

--------------------------------------------------------------------------------
Committed in r10304 and merged in 2.0-stable.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョン2.0.4_54 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0