diff options
author | Go MAEDA <maeda@farend.jp> | 2018-04-28 23:31:49 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-04-28 23:31:49 +0000 |
commit | 8662c7ef8b9211166ea2a40f6a972ffa29987714 (patch) | |
tree | 833264a2d7d0db401187ace9f752b75d5a178a58 /app/models/version.rb | |
parent | 07f0c2791edcbb73f5a5ef01410ee5666a79c6d1 (diff) | |
download | redmine-8662c7ef8b9211166ea2a40f6a972ffa29987714.tar.gz redmine-8662c7ef8b9211166ea2a40f6a972ffa29987714.zip |
Filter for version name should be case-insensitive (#27122).
Patch by Holger Just and Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17316 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 74c3309e9..53d1d7758 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -134,7 +134,7 @@ class Version < ActiveRecord::Base scope :like, lambda {|arg| if arg.present? pattern = "%#{arg.to_s.strip}%" - where("LOWER(#{Version.table_name}.name) LIKE :p", :p => pattern) + where([Redmine::Database.like("#{Version.table_name}.name", '?'), pattern]) end } scope :open, lambda { where(:status => 'open') } |