プロジェクト

全般

プロフィール

Defect #1321

未完了

[Patch] Undefined method `t' when viewing activity

A B さんが約10年前に追加.

ステータス:
新規(New)
優先度:
通常(Normal)
担当者:
-
対象バージョン:
-
開始日:
2014/04/23
期日:
進捗率:

0%

予定工数:

説明

Viewing the activity (with hudson-builds included) fails when a build is in progress with the following exception:

ActionView::Template::Error (undefined method `t' for #<Class:0xbda2dec>):
    13:       if @project
    14:         xml.title truncate_single_line(item.event_title, :length => 100)
    15:       else
    16:         xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
    17:       end
    18:       xml.link "rel" => "alternate", "href" => url
    19:       xml.id url
  lib/plugins/acts_as_event/lib/acts_as_event.rb:62:in `call'
  lib/plugins/acts_as_event/lib/acts_as_event.rb:62:in `event_title'
  app/views/common/feed.atom.builder:16:in `block (3 levels) in _app_views_common_feed_atom_builder__175650721_95074890'

The issues is a missing class qualifier; the following patch fixes this:

--- ./redmine_hudson/app/models/hudson_build.rb.orig    2014-04-22 23:45:21.140798465 -0700
+++ ./redmine_hudson/app/models/hudson_build.rb 2014-04-22 23:45:37.345052669 -0700
@@ -32,7 +32,7 @@
   # 活動の表示内容を規定
   acts_as_event :title => Proc.new {|o|
                                   retval = "#{I18n.t(:label_build)} #{o.job.name} #{o.number}: #{o.result}" unless o.building?
-                                  retval = "#{I18n.t(:label_build)} #{o.job.name} #{o.number}: #{t(:notice_building)}" if o.building?
+                                  retval = "#{I18n.t(:label_build)} #{o.job.name} #{o.number}: #{I18n.t(:notice_building)}" if o.building?
                                   retval
                                 },
                   :description => Proc.new{|o|

表示するデータがありません

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