Vote #62819
完了Files displayed in Projects::Activity view shows title twice, but no description
0%
説明
When viewing the Activity page, anytime a file is displayed in the latest activity, the description doesn't show properly, i.e., it shows the title again, not the description. Here's the affected code in apps/views/projects/activity.rhtml, lines 7-14:
7: <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
8:
9: <%= link_to h(truncate(e.event_title, 100)), e.event_url %>
10:
11: <%= format_activity_description(e.event_description) %>
12: <% end %>
13:
14: <% end -%>
Even though this code looks right, the file is displayed like this...
[Time] 10:42 PM [Title] File_Title_Example.jpg
[Title] File_Title_Example.jpg
[Author] Marty McGee
but should be displayed like this...
[Time] 10:42 PM [Title] File_Title_Example.jpg
[Description] File Description Example
[Author] Marty McGee
journals
Fixed in r1227. The attachment description is now displayed in the activity view.
--------------------------------------------------------------------------------
I think i have the same problem from .
I have update from 0.6 to 0.7-stable branch in dev.
ActionView::TemplateError (undefined method `description' for #<Attachment:0xb7151b40>) on line #11 of projects/activity.rhtml:
8: <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
9: <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span>
10: <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> <%= link_to h(truncate(e.event_title, 100)), e.event_url %></dt>
11: <dd><% unless e.event_description.blank? -%>
12: <span class="description"><%= format_activity_description(e.event_description) %></span><br />
13: <% end %>
14: <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
sh-3.1# svn update
À la révision 1315.
--------------------------------------------------------------------------------
Can you close it? its my bad forget to update the db. :)
--------------------------------------------------------------------------------
Solved on IRC, user forgot to migrate its database.
--------------------------------------------------------------------------------