0
이것은 꽤 오래 걸릴 것입니다.Devise로 로그인하면 부트 스트랩 CSS가 깨집니다.
여기 여기. 사용자가 로그인하지 않을 때 내가 표현하고자하는
<div class="jumbotron">
<div class="container">
<h1>Welcome to Stynyl</h1>
<p>...where style meets vinyl</p>
<% if !user_signed_in? %>
<%= link_to 'Log in', new_user_session_path, class: 'btn btn-primary btn-lg' %>
<%= link_to 'Sign up', new_user_registration_path, class: 'btn btn-lg btn-default' %>
<% end %>
</div>
</div>
내 _home.html.erb 부분적인 모든 것들의 인덱스입니다. 그것은 또한 내 뿌리입니다. 첫 번째 줄을 참고하십시오 :
<%= render 'pages/home' if !user_signed_in? %>
<div id="things" class="transitions-enabled">
<% @things.each do |thing| %>
<div class='panel panel default'>
<div class="box">
<%= link_to image_tag(thing.image.url(:medium)), thing %>
<div class='panel-body'>
<strong><p><%= thing.title %></p></strong>
<p><%= thing.description %></p>
<%= thing.user.email %>
<% if thing.user == current_user %>
<%= link_to edit_thing_path(thing) do %>
<span class='glyphicon glyphicon-edit'></span> Edit
<% end %>
<%= link_to thing_path(thing), method: :delete, data: { confirm: 'Are you sure?' } do %>
<span class='glyphicon glyphicon-trash'></span> Delete
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
사용자가 로그인하면 내 Things가 홈 페이지에 올바르게 표시됩니다. 로그 아웃 할 때 그러나 상황이 심지어 내가 그들을 배치 한 컨테이너 사업부의 외부 페이지에 걸쳐 흩어 여기에 프로젝트의 GitHub의 저장소이다.
https://github.com/drichards2013/stynyl
내가 여기에 있기 때문에 그것을 떠 났어요 당신은 아마 무슨 일이 일어나고 있는지 알아 내려고 할 필요가있을 것입니다.
Nailed it. 고마워, 친구. –