I can send a comment to the author of the post with this function.How can I make a function that will send comments to posts for the last hour to the authors of these posts?
I am new to this business
class CommentMailer < ApplicationMailer
def new_comment(comment)
@comment = comment
@post = @comment.post
mail to: @post.user.email, subject: "New comment on your post"
end
end