I have the following which gives me a list of comments:
@comments = record.commentable.comments
Recordin this case is a comment taken by an observer. What I want to do is get a list of comments, with the exception of the last comment, which in this case is a post.
I tried the following, but with errors
"ActionView :: Template :: Error (invalid number of arguments (0 for 1)):"
@comments = record.commentable.comments.where(:id != record.id)
Suggestions? thank
source
share