Forum: Ruby redirect_to shows an empty page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
14b7344777a56ac9a1fad849f5d6da2a?d=identicon&s=25 sayoyo (Guest)
on 2005-12-08 20:28
(Received via mailing list)
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
33ec7e55a251c1be8d6febfd929aebbe?d=identicon&s=25 Greg Kujawa (gregarican)
on 2005-12-08 21:09
(Received via mailing list)
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/mailman/listinfo.
This topic is locked and can not be replied to.