I am using the acts_as_commentable plugin
(http://www.juixe.com/projects/acts_as_commentable) and have struck a
I have a number of models that use acts_as_commentable (news, events &
documents) that typically look like:
class News < ActiveRecord::Base
The controllers are like:
class NewsController < ApplicationController
@comments = @news.comments
And the view:
<%= render :partial => '/comments/comment', :collection => @comments %>
<%= comment.title %>
<%= comment.user.fullname %>
This last line references a function in the user model:
When there are no comments attached to the news, events and documents
display correctly (probably because the comments code is not called).
When I add a comment I get the error:
"undefined method 'fullname' for #<User:0x92836498>"
This is really weird because I have a comments controller that uses the
same calls, partials etc, but displays the comments as expected.