[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

redirect_to shows an empty page

sayoyo Sayoyo

12/8/2005 7:25:00 PM

Hi,

I have a little problem with "redirect_to", I use in on a login
procedure, but it always shows an empty page....

class AdminController < ApplicationController

def index
#do somthing
end

def login
one user = checkUser
if ( oneUser != nil ) then
flash[:notice] = "Welcome " + oneUser.name
session[:user_id] = oneUser.id
if (oneUser.user_type == User::UserType_Admin) then
redirect_to({:controller => "admin", :action => "index"})
else
redirect_to(:controller => "mainframe", :action => "index")
end
end
end
end

if it redirects to "mainframe" (another controller) I can see
everything, but if it redirects to the same controller "admin", I
always got an empty page!!!!

does any one know what is happening????

thanks you very much

Sayoyo

1 Answer

greg.kujawa

12/8/2005 8:04:00 PM

0

say...@yahoo.com wrote:

> Hi,
>
>
> I have a little problem with "redirect_to", I use in on a login
> procedure, but it always shows an empty page....

You might have better results posting this to the Rails mailing list at


http://lists.rubyonrails.org/mailma....