Добрый день.
Имеется форма:
= form_for :callback_profile_params,
                 :url    => { :controller => 'users', :action => 'callback_profile' },
                 :method => 'POST',
                 :remote => true,
                 html: { id: 'callback_profile', :class => 'send-form' } do |f|
        = hidden_field_tag :authenticity_token, form_authenticity_token
        = f.text_field :user_id, :type => 'hidden', :value => current_user.id
        .form-group
          = f.text_field :title, :placeholder => 'Тема обращения'
        .form-group
          = f.text_area :message, :placeholder => 'Вопрос'
        = submit_tag 'Отправить', :class => 'btn btn-primary', :id => 'btn_submit'
Coffee:
$ ->
  $("#callback_profile").on("ajax:success", (e, data, status, xhr) ->
    $("#btn_submit").replaceWith data
   ).on "ajax:error", (xhr, status, error) ->
    $("#btn_submit").replaceWith data
В контроллере:
before_action :authenticate_user!
  def callback_profile
    render :text => 'Запрос успешно прошел.'
  end
По нажатию кнопки отправить, сразу всплывает alert с текстом: "Message was not sent. Client error or Internet connection problems."
Если глянуть в консоль, то ajax запрос прозошел,  и вернул код 200.
Не пойму откуда берется этот алерт, и до выполнения Coffee как-то не доходит из-за него..