Answer the question
In order to leave comments, you need to log in
How to update content with ajax on user authorization via devise?
There is such a design on the main page, how to make it update with ajax during authorization, authorization through Devise
<% 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 %>
$("#login ").bind("ajax:success", function(event, xhr, settings){
});
class SessionsController < Devise::SessionsController
respond_to :html, :json
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question