RuntimeError with Rails Recipe "Authenticating Your Users"

HI,

I’ve gotten this Rails Recipe running fine (a bit before I completely
understand it) except when the signin is incorrect I return an
error(below). All I want is to either have the incorrect signin
redirected to “store” rhtml
or to a refreshed and empty signin. Any clues???

TIA

Chas

######From Browser ##### http://localhost:3000/admin/signin
RuntimeError in AdminController#signin

Username or password invalid
RAILS_ROOT: public/…/config/…

Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/app/models/user.rb:8:in authenticate' #{RAILS_ROOT}/app/controllers/admin_controller.rb:15:insignin’
Request

Parameters: {“commit”=>“Sign in”, “username”=>“fff”, “password”=>“fff”}

Show session dump

Response

Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

I think I’m looking for a way to deal with an “exception” in ruby. Can
someone point me to a place where I can find out how to implement this?

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