link_to
에 대한 JQuery 모바일 Ajax 호출을 비활성화 할 수 없습니다.레일로 Ajax 호출 사용 안 함 link_to
나는
<a href="/my_post" data-ajax="false" data-icon="plus" data-iconpos="left" data-inline="true" data-method="post" data-role="button" rel="external nofollow">test</a>
my_post 내가 data-ajax=false
을 설정하는 것을 문질러서
def my_post
redirect_to another_method_path(....)
end
그냥 리디렉션입니다
<%= link_to 'test', my_post_path, :method => :post, "data-role" => "button", "rel" => "external", "data-ajax"=>"false", "data-inline" => "true", "data-icon" => "plus", "data-iconpos" => "left" %>
이것은 다음과 같은 HTML에서 traslated되는 리디렉션과 링크가 이 링크를 위해 Ajax를 사용하지 못하도록하는 데는 충분했지만, 그렇지는 않습니다. another_method_path
이 먼저 호출되어 나를 my_post_path
으로 남겨 둡니다.
내가 Ajax를 사용하지 않으면 완전히
$.mobile.ajaxEnabled = false;
그것은 예상대로 작동된다.
link_to
지역화에서 뭔가 잘못하고 있습니까?
감사합니다. 참으로 게시물이었습니다! 링크를 정상적인 것 (그리고 폼에 대한 포스트)으로 바꾼다. –