Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(28)

Unified Diff: app/models/user.rb

Issue 2323: Upgrade to Rails 2 SVN Base: http://familyconnect.rubyforge.org/svn/trunk/
Patch Set: Created 1 year, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: app/models/user.rb
===================================================================
--- app/models/user.rb (revision 36)
+++ app/models/user.rb (working copy)
@@ -20,7 +20,7 @@
# @user = User.authenticate('bob', 'bobpass')
#
def self.authenticate(login, pass)
- find_first(["login = ? AND password = ?", login, sha1(pass)])
+ User.find(:first, :conditions => ["login = ? AND password = ?", login, sha1(pass)])
end
def name
@@ -28,7 +28,7 @@
end
def self.administrator
- find :first, :conditions => ["admin = ?", true]
+ User.find(:first, :conditions => ["admin = ?", true])
end
def visit_now(stamp = DateTime.now)

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483