similar to: acts_as_authenticated, reset_session, and redirect_back_or_default

Displaying 20 results from an estimated 900 matches similar to: "acts_as_authenticated, reset_session, and redirect_back_or_default"

2006 May 22
0
acts_as_authenticated mailing for activation problem
Hi I''m relatively new to all this, so sorry if this is a daft question. I''ve got the acts_as_authenicated plugin working and have added the user activation extras - which is all fine but I can''t seem to get the activation mail sent. My mail setup in config/environment.rb works with other notifiers, so I was wondering if there''s anything I''m not
2006 May 03
0
Accessing the params hash in a functional test not working
I am having problems reading params in a functional test (Rails 1.1.2). My test looks like this: fixtures :users def test_auth_bob @request.session[:return_to] = "/bogus/location" post :login, :user => { :email => "bob@example.com", :password => "test" } assert_session_has :user assert_equal @bob, @response.session[:user]
2010 Feb 19
0
You are being redirected
I have done something to my application controller so that instead of the redirected page itself am now seeing this as a response: <html><body>You are being <a href="http://www.example.com/ welcome">redirected</a>.</body></html> I do not know why this is happening or what I did to trigger this behaviour. The API does not give me any clues as to
2005 Nov 25
0
Login Authentication working in IE but not in Mozilla
I have gone through the following site for the creation of my login page: To mention I am using Windows XP pfofessional running on WEBBrick server http://wiki.rubyonrails.com/rails/pages/HowtoAuthenticate The code is given in the following 3 steps: 1)The controller that needs protection: class WeblogController < ActionController::Base before_filter :authenticate def index # show
2006 Jun 14
1
reset_session when Ruby goes down
Hi, In my web application we have implemented the session and it works fine. ie. it prompts for the userid/password when ever we give the URL by opening a new IE window. i.e it goes through the session and see if the :user_id is present in the session if not it prompts to log-in again. But my problem is say if we "kill" the WebRICK abruptly by pressing ^C and say my browser window
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi, I just installed Rails 2.0.2 [root@mymachine easyx]# ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] [root@mymachine easyrx]# gem install rails --include-dependencies Need to update 16 gems from http://gems.rubyforge.org ................ complete Successfully installed rails-2.0.2 [root@remandev easyrx]# But I''m getting this error in my restful_authentication
2007 Feb 10
5
acts_as_authenticated strangeness
hi the strangest thing is happening. on my local machine acts_as_authenticated works fine, but whe on the server [dreamhost] it refuses to log in. no error messages. nothing. just reloads the login page again. here`s my action: def login return unless request.post? flash[:notice] = "Incorrent login" self.current_user = User.authenticate(params[:login], params[:password])
2008 Mar 07
0
ActiveRecordStore: cleanup & avoiding duplication
Hi, I''m using ActiveRecordStore to track user sessions. I''ve used as a base the next sources: - http://blog.levicole.com/articles/category/ror - http://matt-beedle.com/2006/12/13/rails-how-to-find-out-who-is-online/ - http://www.williambharding.com/blog/?p=99 This is what I currently do: IN SESSION CONTROLLER def create self.current_user = User.authenticate(params[:login],
2005 Nov 15
1
undefined method `redirect_back_or_default' w/ Salted Login Generator tests
Hi, I upgraded to Rails 0.14.3 and I am getting NoMethodError exceptions while running the functional tests for the Salted Login Generator. Is redirect_back_or_default no longer part of the ApplicationController? I don''t recall seeing anything about -- Frank Kim http://meetingkoreans.com http://betweengo.com
2007 May 23
3
User Login (process_login)
Hiya - before I start let me tell you i''m a Nuby on Rails. I''ve created a user registration within my application that requires email validation and that seems to be working fine. I''m now creating the user login page and have the following code in my UsersController: def login @user = User.new @user.username = params[:username] end def
2006 Jun 28
2
Saving and reproducing a POST request.
Hi I have an action which saves the originating resource from which it was called, and returns to it later. This is done by setting: session[:return_to] = request.referer ... redirect_to(session[:return_to]) Which works great for GET resources. The problem is that POST variables aren''t kept in request.referer, so this method fails when the originating resource is a a POST.
2006 May 25
1
AppMailer and McCray''s theme generator
Hi, I am using Matt McCray''s theme generator. http://rubyforge.org/projects/theme-generator/ Everything works fine, but rendering an action in a controller using the AppMailer raises this: undefined method `current_theme'' for #<AppMailer:0x39df950> Is there someone who could help me ? Thanks ! Mickael. Traces:
2006 Dec 27
5
redirect back to where I was before action?
For some reason I cannot find the documentation for this. How can I store the current URI/URL so that I can return with a redirect_to? session[last_action] = ??? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ... Why doesn''t rescue_from ActionController::RoutingError work witht he code from http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details
2007 Feb 22
4
Modifying Apache Conf To Block Leachers
Howdy, I''m using Apache 2.2 + Mongrel with great success, using the sample configs from the Mongrel site. We have some MP3s on the site and recently someone has been stealing them and basically leaching them from the site, linking to them from an off-site location. I''ve been trying to modify my Apache conf to check the referrer and adjust accordingly as below but no
2006 Apr 28
2
["acts_as_authenticated"] << "Role-Based Authorization Rails Recipe"
hi guys, has anyone here implemented role based authorization from rails recipes into acts_as_authenticated ? how''s it going? Case: there is ONE admin. And MANY users. Admin is the only one who can create, edit, delete user, etc.. users also need to login, but go to different pages. do you guys think it''s good to try rick''s acts_as_authenticated + chad''s
2007 Sep 11
2
acts_as_authenticated redirect on ajax requests
Hi there, I''d like to know if there is a solution to the scenario when using acts_as_authenticated and ajax: I have an action in my controller which is protected by login via acts_as_authenticated. Now, this action can be called both by human interaction, as well as ajax requests. (It is an add to cart link). It works great as long as I am in an authenticated session. Now, I want to
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2006 Apr 12
3
acts_as_authenticated trouble
First off, I''d like to address that I''m n00bs. I''ve read the README and blogs associated with this plugin, and there really isn''t too much documentation. I have the newest version of rails,ruby, and acts_as_authenticated installed. #The setup I set up the acts_as_authenticated in the following manner. *created a table called "accounts" in the
2007 Jan 02
0
acts_as_authenticated plugin rspecs
Hello, Just thought it could be interesting for some of you. I''ve written rspecs for acts_as_authenticated plugin. http://rashkovskii.com/articles/2007/01/01/rspec-on-rails- acts_as_authenticated I''m not sure they are 100% ok, but they seem to be :) Thank you, Yurii.