这是我在客户/订单控制器中的代码。
render :update do |page|
page.replace_html "example_check" ,:partial=>'customer/orders/pending_orders',:object=> "Your Message Has Been Sent "
end
在customer / orders / pending_orders.html.erb
中<div id="example_check">replace here</div>
我想在另一个名为"Your Message Has Been Sent "
的控制器视图文件中替换'customer/orders/pending_orders'
消息。相同控制器的更换工作正常。任何解决方案?
答案 0 :(得分:0)
试试
page.replace_html "example_check", "Your Message Has Been Sent"