RailsCasts Pro episodes are now free!

Learn more or hide this

Bryan Taylor's Profile

GitHub User: tightwork

Comments by Bryan Taylor

Avatar

How would you destroy a comment?
I get:

NoMethodError in CommentsController#destroy
undefined method
comments' for #Comment:0x000000030aae58`

comments controller:

ruby
 def destroy
    @comment = @commentable.comments.find(params[:id])
    @comment.destroy
Avatar

Maybe I am over complicating this with gon? I can just render it directly with json and use the GET method in Fullcalendar?

Avatar

How did you expose your events to Fullcalendar? did you pass the json with gon or as an array? I have my events passed with gon sitting in window.gon but I have no idea how to set it into events:[