Посмотрел предыдущие решения данной проблемы, но так и не нашёл решения для себя. Локально в development все отправляется ровно и как надо. Делаю assets:precompile - форма 2 раза отправляется, делаю assets:clobber => все снова работает каки задумывалось. После того как выкладываю на production(локум.ру), формы всегда отправляются по 2. Если сделать assets:clobber, то слетают assets. Есть ли решение это проблемы?
Не знаю уже где искать ошибку, попробывал и rake assets:precompile && rake assets:clobber(clean тоже делал)
doctype html
html lang="en"
head
meta charset="utf-8" /
meta content="width=device-width, initial-scale=1.0" name="viewport" /
title= content_for?(:title) ? yield(:title) : "
= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= csrf_meta_tags
body
.row
= yield
= javascript_include_tag "application"
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require foundation
//= require turbolinks
//= require jquery.color-2.1.2.min
$(function(){ $(document).foundation(); });
production.log
I, [2014-08-11T12:18:22.551991 #14031] INFO -- : Started POST "/projects" for 92.100.79.94 at 2014-08-11 12:18:22 +0400
I, [2014-08-11T12:18:22.554364 #14031] INFO -- : Processing by ProjectsController#create as JS
I, [2014-08-11T12:18:22.554524 #14031] INFO -- : Parameters: {"utf8"=>"", "name"=>"Для проверку"}
I, [2014-08-11T12:18:22.560895 #14031] INFO -- : Rendered projects/_project.html.slim (0.3ms)
I, [2014-08-11T12:18:22.563335 #14031] INFO -- : Rendered projects/create.js.coffee (3.0ms)
I, [2014-08-11T12:18:22.563580 #14031] INFO -- : Completed 200 OK in 9ms (Views: 3.6ms | ActiveRecord: 2.7ms)
I, [2014-08-11T12:18:22.564771 #14031] INFO -- : Started POST "/projects" for 92.100.79.94 at 2014-08-11 12:18:22 +0400
I, [2014-08-11T12:18:22.566380 #14031] INFO -- : Processing by ProjectsController#create as JS
I, [2014-08-11T12:18:22.566446 #14031] INFO -- : Parameters: {"utf8"=>"", "name"=>"Для проверку"}
I, [2014-08-11T12:18:22.572834 #14031] INFO -- : Rendered projects/_project.html.slim (0.3ms)
I, [2014-08-11T12:18:22.574709 #14031] INFO -- : Rendered projects/create.js.coffee (2.4ms)
I, [2014-08-11T12:18:22.574962 #14031] INFO -- : Completed 200 OK in 8ms (Views: 3.0ms | ActiveRecord: 3.0ms)
UPDATE
выявил интересную штуку, 2 запроса отправляются только в том случае, если страницу не перегружать. Если зайти на страницу, обновить её, то все нормально :)
не подскажите как выковыривать этот баг начать?