在我们网站的一个部分,用户将......
如果他们在完成流程之前从下拉菜单中选择了不同的项目,则控制器中的以下操作会将它们指向新项目的第一页。
def change_select_item
flash[:error] = "You changed the selected item in the middle of this process. The item you left is not finished until you complete the process. To address the item you just selected requires us to start at the beginning."
redirect_to :action => :index
end
当它们被重定向回第一页时,我在Firefox中收到此警告。
To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
如果有人点击取消,则重定向会被取消,只会将新选项留在同一页面上,这正是我试图阻止的。
有没有办法清除表单数据?这会阻止来自Firefox的消息吗?还有另一种方式吗?
谢谢!