search for: original_uri

Displaying 7 results from an estimated 7 matches for "original_uri".

2007 Nov 02
4
Login Redirect - Hacking the session[original_uri]
Hi There, I have several ajax elements that require authorization, but for various reasons, they can''t pass session[original_uri] to the redirect on user log in. I''m trying to hack in a uri by passing a param to the login page. I can see that the param is passing into the login page, but for whatever reason, no matter what I do, the user is redirected to the homepage after login. Would anyone have any ideas? tha...
2010 Apr 26
2
woriking under webrick but not under passenger
...me} created" @user = User.new end end def login_page session[:user_id] = nil if request.post? user = User.authenticate(params[:name], params[:password]) if user session[:user_id] = user.id session[:user_name] = user.name uri = session[:original_uri] session[:original_uri] = nil redirect_to(uri || { :action => "index" }) else flash[:notice] = "Invalid user/password combination" end end end def logout session[:user_id] = nil flash[:notice] = "Logged out" r...
2007 Jun 18
0
login pre-filter and post data problems
...ng to use a standard sort of login controller, whereby you put a pre-filter on the pages on which you want the user to have to login. This is all well an good, except for one thing. Here is some code to save the original request uri before redirecting to the logon page. def authorize ... session[:original_uri] = request.request_uri logger.info("ApplicationController: request_uri #{request.request_uri}") ... end Unfortunatly one of my pages has a form on it with a single "action" type button. Hence it''s a post request, and since it''s a post request it appears that...
2007 Jul 17
12
Getting past my login system
Thank you in advance for your help. I am relatively new to both Rails and Rspec and I am hoping for some insight from some experienced veterans. Right now I am using Rspec for code that has already been written so that additional functionality can be developed using the BDD method. My problem shows up when I try to spec controllers that are behind the login system. Each page checks for the
2006 Jul 17
10
getting the user name
Hi I am new to ruby and trying to obtain the user name in the login index.rhtml where I could display "You have logged in [user name]" How could I do this? I have been trying different options after reading the ruby manual but still throw an error. please help -- Posted via http://www.ruby-forum.com/.
2006 Jul 16
9
acl_system help is needed
i found Ezra''s acl_system plugin yesterday and i am trying to figure it out. based on the simple instructions on the site, it does exactly what i need but i''m getting some errors when i try to use it: NoMethodError in UsersController#index You have a nil object when you didn''t expect it! The error occured while evaluating nil.roles i am pretty new to rails and
2007 Aug 17
1
Scaffold (Agile Web Development With Rails)
...ems/1.8/gems/rails-1.2.3.7116/lib/commands/server.rb:39 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' script/server:3 Request Parameters: None Show session dump --- :original_uri: :user_id: 1 flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} [output] Any tip? AFAIK, my code is identical from the book. Sorry the poor english. Thanks. -- Davi Vidal -- E-mail: davi...