Salted Login Generated code throwing lots of errors


I’m having a lot of problems while integrating the salted login
generator. All of the errors are of the form:
“The error occured while evaluating nil.[]”

Most seem to be down to evaluating a nested hash, where the first hash
is a nil object. For example, @params[‘user’][‘login’] where
@params[‘user’] returns the nil object. This method in particular is
annoying me:

def login
@user =[‘user’])
if @session[‘user’] = User.authenticate(@params[‘user’][‘login’],
flash[‘notice’] = l(:user_login_succeeded)
redirect_back_or_default :action => ‘welcome’
@login = @params[‘user’][‘login’][‘message’] = l(:user_login_failed)

This craps out on the line:
if @session[‘user’] = User.authenticate(@params[‘user’][‘login’],
and the line:
@login = @params[‘user’][‘login’]

Is there any way I can fix this problem without a lot of dull re-coding?

I’m using the Rails 0.14.4 and salted_login_generator 1.1.1



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs