azback5 said over 3 years ago on User Notifications :
  Thanks, so I just implemented this in a CommentNotifier model as you've written (correcting the typo above in your def self.call at the beginning 'comnet' to 'comment' and here is how the create method looks in my Comments Controller...

  def create

      @comment = @commentable.comments.new(comment_params)
      @comment.user = @current_user
      if @comment.save
        CommentNotifier.call(comment, current_user)
        respond_to do |format|
          format.html { redirect_to @commentable }
          format.js # create.js.erb
        end
      else
        redirect_to cookies[:original_referrer]
        flash[:error] = "Comment could not be created."
      end
    end

But I receive this error 

NameError (undefined local variable or method `comment' for #<BlogPosts::CommentsController:0x00007fd7bfe4c818>
Did you mean?  @comment):
  
app/controllers/comments_controller.rb:18:in `create'

which is puzzling because it seems to point to my namespaced BlogPosts::CommentsController < CommentsController

class BlogPosts::CommentsController < CommentsController

    before_action :set_commentable

    def new
     @comment = Comment.new(commentable: @commentable)
   end


  private

  def set_commentable
    @commentable = BlogPost.friendly.find(params[:blog_post_id])
  end
end

I'll be happy to send you a link to my GitHub repo if that will help provide more insight!

Thanks for your time and consideration...