Ruby redirect用法
在此示範是在 admin::jobs Controller裡面 下面指令會回到 admin_jobs_path
redirect_back fallback_location: root_path , notice: "#{@jobs.title}發布成功"
導向admin_jobs_path
等於是admin / jobs / Index.html.erb
redirect_to admin_jobs_path, alert: "#{@jobs.title}刪除成功"