为什么这不起作用?我尝试了多种选择,例如渲染和放置,但它不想正确更改。几个想法用户?
风景:
<div id = "container">
<div id = "smaller-container">
<%= user_signed_in? %>
<%= @Uchecker %>
<% else %>
<%= link_to "Sign Up", new_user_registration_path, :id => "SignUpText" %>
</div>
控制器:
class PostsController < ApplicationController
def Uchecker
@Uchecker = redirect_to user_session_path
end
end