search for: authcontroller

Displaying 5 results from an estimated 5 matches for "authcontroller".

2006 Apr 13
1
Model is not a class
...ueness_of :username validates_length_of :password, :within => 6..20 validates_confirmation_of :email, :password def self.authenticate(username, password) find_first(["username=? AND password=?", username, password]) end end and this is my controller: class Account::AuthController < ApplicationController model :account ..... end I guess the problem is that I''m using a module, my controller is inside controllers/account/auth_controller.rb. I''m not able to find the mistake, my model is clearly a class ... Ideas ? TIA, ngw -- Nicholas Wiela...
2007 Sep 13
5
Authenticating before tests
Hi all, I''m using Goldberg, an engine that provides roles based access control for my app. I need to login before I can do controller tests, but I can''t find any examples of people doing this. Could someone point me in the right direction? I thought the simplest way would be to either call the login action from my other tests before(:all), but I can''t seem to
2006 Jan 13
0
Layout not rendered when render_component used
...with username and password fields. It''s called from the main application.rhtml layout so I don''t need to have a seperate page (away from the main site) with a login form. My user model is more-or-less the same as in the Agile RoR book. app/controllers/auth_controller.rb: class AuthController < ApplicationController layout false def login if request.get? @user = User.new else @user = User.new(@params[:user]) logged_in_user = @user.try_to_login if logged_in_user # handle setting cookies, setting session # and redirecting to index...
2006 Dec 01
4
uninitialized constant error in app but not when using console
...rescue Exception => e raise e ensure self.connection.disconnect! if self.connection.active? end true end end end end in my auth controller i have auth_controller.rb ------------------------- require ''myapp.rb'' class AuthController < ApplicationController def login begin auth = MyApp::ExternalSource::Connection.authenticate(:login => params[:login], :password => params[:password], :env => "MYAPP_" + RAILS_ENV.upcase) rescue Exception => e ... end end def logout ......
2006 May 25
3
webservice timeout issue
...al/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in `process!'' /Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24 Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) Processing AuthController#api (for 127.0.0.1 at 2006-05-24 22:25:02) [POST] Session ID: 6615e9cda1cbf643ac216968825c39b7 Parameters: {"<?xml version"=>"\"1.0\" encoding=\"utf-8\" ?>\n<env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:env=\"h...