I’m trying to figure out how multiple partials in one page would be
configured when they are based on some action in the controller.
As an example -
I have a main/welcome page. If someone new or a user not logged in
arrives at this page I display both a registration form and a login
form. However, if they are logged in then those forms should not show
up on that page. Also should mention that I have a _register partial
and a _login partial.
Now maybe I just need a seperate page to welcome users who are logged
in but I want to see if I could do it as described above.
Right now the welcome.rhtml page is set up like such:
<% if @u %> #if user is logged in / session
<%= render :partial => “main/logout” %>
<%= render :partial => “main/session” %>
<%= @c.first_name %>
<% else %>
<%= render :partial => “main/login” %>
<%= render :partial => “main/register” %>
<% end %>
So what exactly is your problem? I can’t quite work that out from the
post. What are you trying to achieve and why is what you are doing
currently not working?