I'm using Rails, Twitter Bootstrap and Devise gem.
Maybe my principe of calling modals is bad, but it worked, so I will explain where is problem.
Here is my header:
<div class="modal hide" id="login">
<%= render :template => "devise/sessions/new" %>
</div>
<div class="modal hide" id="sign_up">
<%= render :template => "devise/registrations/new" %>
</div>
<div class="modal hide" id="congrats">
<%= render :template => "devise/registrations/congrats" %>
</div>
And all is working, modals are calling from modals(when user want to get Sign Up form from login),
BUT when I add this line:
<div class="modal hide" id="forgot_password">
<%= render :template => "devise/passwords/new"%>
</div>
My view starts showing only header.
Here is code from devise/passwords/new:
<div class="login_header">
<a class="close" data-dismiss="modal">
<%= image_tag("/images/close_btn.png") %>
<%= image_tag("/images/login_logo.png") %>
<div class="login_header_text">
<h2>Forgot your password?</h2>
<hr id="line">
</div>
</div>
<div class="form_for_new">
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:method => :post }) do |f| %>
<%= devise_error_messages! %>
<div class="field2">
<%= f.label :email %><br />
<%= f.email_field :email %>
</div>
<div class="login_submit">
<%= f.submit "Send me", class: "btn login" %>
</div>
<% end %>
And I call it from login modal:
<b><%= link_to("Forgot?", "#forgot_password", "data-toggle" => "modal") %></b>
in modal showing all content(home page) with forgot password form.
Can someone help me ?