redirect_to shows an empty page

S

sayoyo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top