After update to rails 5.1 and added the acts_as_commentable (4.0.2) This is due to the new rails?
someone is having the same issue with this gem?
The log shows
ArgumentError in PostsController#show
The scope body needs to be callable.
class Comment < ActiveRecord::Base
include ActsAsCommentable::Comment
belongs_to :commentable, :polymorphic => true
in the posts controller
def show
@post = Post.find(params[:id])
@comment = @post.comments.new
end
Aucun commentaire:
Enregistrer un commentaire