|
|
@ -7,14 +7,13 @@
|
|
|
|
<link rel="stylesheet" href="/stylesheets/weui/weui.min.css"/>
|
|
|
|
<link rel="stylesheet" href="/stylesheets/weui/weui.min.css"/>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery.min.js" />
|
|
|
|
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery.min.js" />
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
<%= javascript_tag "var AUTH_TOKEN = '#{form_authenticity_token}';" if protect_against_forgery? %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$(function(){
|
|
|
|
$("#submitForm").click(function(){
|
|
|
|
$("#submitForm").click(function(){
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
type: "POST",
|
|
|
|
url: $(this).parent("form").attr("action") + "?&authenticity_token=" + AUTH_TOKEN,
|
|
|
|
url: $(this).parent("form").attr("action") + "?&authenticity_token=" + <%=form_authenticity_token%>,
|
|
|
|
data:$(this).parent("form").serialize(),
|
|
|
|
data:$(this).parent("form").serialize(),
|
|
|
|
dataType: "json"
|
|
|
|
dataType: "json"
|
|
|
|
});
|
|
|
|
});
|
|
|
|