私はRuby on Railsの初心者で、コントローラーから情報を表示するために通知または送信する方法を理解できません。ここにコードがあります=>
def index
@post = Post.all()
#here i want notify new_post_view about Post's empty
if @post.length == 0
redirect_to new_post_path
end
end
どうすればこれを行うことができますか??