diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-12-04 13:59:14 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-12-04 13:59:14 +0000 |
commit | c8462efd86ce1cedf5e64df13bc4b0d163cd19d8 (patch) | |
tree | b6a47a45ccca33ebd5bb6b615a56c23faa8099a8 /lib/redmine | |
parent | 279ae9cd1e1cf8507f2beae7575f390308eaaf91 (diff) | |
download | redmine-c8462efd86ce1cedf5e64df13bc4b0d163cd19d8.tar.gz redmine-c8462efd86ce1cedf5e64df13bc4b0d163cd19d8.zip |
shorten long line of lib/redmine/database.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/database.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/redmine/database.rb b/lib/redmine/database.rb index 073bdf4ba..34365c353 100644 --- a/lib/redmine/database.rb +++ b/lib/redmine/database.rb @@ -40,9 +40,14 @@ module Redmine def postgresql_unaccent? if postgresql? return @postgresql_unaccent unless @postgresql_unaccent.nil? + begin - sql = "SELECT name FROM pg_available_extensions WHERE installed_version IS NOT NULL and name = 'unaccent'" - @postgresql_unaccent = postgresql_version >= 90000 && ActiveRecord::Base.connection.select_value(sql).present? + sql = + "SELECT name FROM pg_available_extensions " \ + "WHERE installed_version IS NOT NULL and name = 'unaccent'" + @postgresql_unaccent = + postgresql_version >= 90000 && + ActiveRecord::Base.connection.select_value(sql).present? rescue false end |