[Instantrails-users] Upgrading Instant Rails to Rails 1.0 RC5 (aka 0.14.4)

Frank Hale frankhale at gmail.com
Sat Dec 10 11:03:36 EST 2005


ok, but the weird thing is that it works on linux. I have since been
rewriting the code to make it better. I've got rid of that method now.

On 12/10/05, David Morton <mortonda at dgrmm.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Frank Hale wrote:
> > Anyway this is the code that causes the problem on Instant Rails.
> >
> > require 'digest/sha1'
> >
> > class User < ActiveRecord::Base
> >
> >       def self.validate(name,pass)
> >               find(:first, :conditions => [ "username = ? AND password = ?", name,
> > Digest::SHA1.hexdigest(pass) ])
> >       end
> >
> > end
> >
> > I'll get a NoMethodError on the find method. If I comment it out, the
> > app will run but of course it doesn't validate a user.
>
> Ok, first problem, you probably don't mean to use validate(), since that is a
> method called when a record is saved; see
> http://api.rubyonrails.com/classes/ActiveRecord/Validations.html
>
> I don't know if that is causing the error or not.
>
> Could you also post the exact stack trace you are getting?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDmvrFSIxC85HZHLMRAg3bAJ9garMnueGg5RN9dA4pa0QBYtEB3gCgkelw
> bHhlpcrxVgCMsvnv9TakrTk=
> =lPNm
> -----END PGP SIGNATURE-----
> _______________________________________________
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/instantrails-users
>


--
"This life is built on match sticks and can crumble at anytime. I'm on
the top floor and I sway in the opposite direction of the wind to
counter act the force of gravity."



More information about the Instantrails-users mailing list