Defect #27122 » Case_sensitive_filter_for_version_name_.patch
app/models/version.rb (revision ) | ||
---|---|---|
45 | 45 |
scope :like, lambda {|arg| |
46 | 46 |
if arg.present? |
47 | 47 |
pattern = "%#{arg.to_s.strip}%" |
48 |
where("LOWER(#{Version.table_name}.name) LIKE :p", :p => pattern)
|
|
48 |
where("LOWER(#{Version.table_name}.name) LIKE LOWER(?)", pattern)
|
|
49 | 49 |
end |
50 | 50 |
} |
51 | 51 |
scope :open, lambda { where(:status => 'open') } |