comment_handler.rb 224 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 class CommentHandler < Struct.new(:comment_id, :method) def perform comment = Comment.find(comment_id) comment.send(method) rescue ActiveRecord::RecordNotFound # just ignore non-existing comments end end