There is such a construction on the main page, authorization through a modal window using json. How to make li login with current_user, without reloading the page
<% if current_user %> <li><a><%= "Hello, #{current_user.fullname}" %></a></li> <li><%= link_to "Sign out", destroy_user_session_path, :method => :delete %></li> <% else %> <li><a href="#create_user_modal" class="modal_fancy">Регистрация</a></li> <li><a href="#login_modal" class="modal_fancy">Вход</a></li> <% end %> Jquery error output processing via json
$("#login ").bind("ajax:success", function(event, xhr, settings){ }); class SessionsController < Devise::SessionsController respond_to :html, :json end Ruby 2.2 Rails 5.0