Project

General

Profile

Actions

Defect #1044

closed

Forum display fails

Added by Adam Knight over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Forums
Target version:
-
Start date:
2008-04-11
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I updated a test site to r1451 and when I go to view a forum post I get a 500 error and the following backtrace in the log:

Processing MessagesController#show (for 67.78.113.42 at 2008-04-11 15:44:13) [GET]
  Session ID: 1e8c531a240a9959ee6681b3a13b046f
  Parameters: {"action"=>"show", "id"=>"2", "controller"=>"messages", "board_id"=>"1"}
Rendering  within layouts/base
Rendering messages/show

ActionView::TemplateError (undefined method `description' for #<Attachment:0x2f4f1a8>) on line #4 of app/views/attachments/_links.rhtml:
1: <div class="attachments">
2: <% for attachment in attachments %>
3: <p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' -%>
4: <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
5:   <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
6:   <% if options[:delete_url] %>
7:     <%= link_to image_tag('delete.png'), options[:delete_url].update({:attachment_id => attachment}),

    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1860:in `method_missing'
    #{RAILS_ROOT}/app/views/attachments/_links.rhtml:4:in `_run_rhtml_47app47views47attachments47_links46rhtml'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:123:in `each'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:123:in `send'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:123:in `method_missing'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/has_many_association.rb:98:in `method_missing'
    #{RAILS_ROOT}/app/views/attachments/_links.rhtml:2:in `_run_rhtml_47app47views47attachments47_links46rhtml'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `send'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `compile_and_render_template'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:301:in `render_template'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:260:in `render_file'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:275:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/partials.rb:59:in `render_partial'

I am using the default theme.

Actions

Also available in: Atom PDF