Permalink
Browse files

Lower() fix #2

  • Loading branch information...
mark-d-holmberg committed Apr 12, 2012
1 parent 30df84d commit ae6330b1f7505db936f6d6975f3a9b58b0a600d1
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/user.rb
View
@@ -42,7 +42,7 @@ class User < ActiveRecord::Base
scope :advisors, lambda { with_role("advisor") }
scope :professors, lambda { with_role("professor") }
scope :gods, lambda { with_role("god") }
- scope :with_name, lambda { |term| where("users.name LIKE LOWER(?)", "%#{term}%") }
+ scope :with_name, lambda { |term| where("LOWER(users.name) LIKE LOWER(?)", "%#{term}%") }
#default_scope order('users.name ASC')

0 comments on commit ae6330b

Please sign in to comment.