summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-24 12:57:50 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-24 12:57:50 +0000
commit404f2fb54da8604168ed6011b5fbddc5fe5b8a95 (patch)
tree38c5a821637b22212542a0d0f19d9cd7f58891a5 /app
parent17e05f35902b5f6bff8ee5b2666b9d8cd739985d (diff)
downloadredmine-404f2fb54da8604168ed6011b5fbddc5fe5b8a95.tar.gz
redmine-404f2fb54da8604168ed6011b5fbddc5fe5b8a95.zip
cleanup: rubocop: fix Layout/IndentFirstArrayElement in app/models/setting.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19248 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/setting.rb30
1 files changed, 17 insertions, 13 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb
index d4e11c355..7fdd79a41 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -26,21 +26,21 @@ class Setting < ActiveRecord::Base
}
DATE_FORMATS = [
- '%Y-%m-%d',
- '%d/%m/%Y',
- '%d.%m.%Y',
- '%d-%m-%Y',
- '%m/%d/%Y',
- '%d %b %Y',
- '%d %B %Y',
- '%b %d, %Y',
- '%B %d, %Y'
- ]
+ '%Y-%m-%d',
+ '%d/%m/%Y',
+ '%d.%m.%Y',
+ '%d-%m-%Y',
+ '%m/%d/%Y',
+ '%d %b %Y',
+ '%d %B %Y',
+ '%b %d, %Y',
+ '%B %d, %Y'
+ ]
TIME_FORMATS = [
'%H:%M',
'%I:%M %p'
- ]
+ ]
ENCODINGS = %w(US-ASCII
windows-1250
@@ -150,8 +150,12 @@ class Setting < ActiveRecord::Base
def self.validate_all_from_params(settings)
messages = []
[
- [:mail_handler_enable_regex_delimiters, :mail_handler_body_delimiters, /[\r\n]+/],
- [:mail_handler_enable_regex_excluded_filenames, :mail_handler_excluded_filenames, /\s*,\s*/]
+ [:mail_handler_enable_regex_delimiters,
+ :mail_handler_body_delimiters,
+ /[\r\n]+/],
+ [:mail_handler_enable_regex_excluded_filenames,
+ :mail_handler_excluded_filenames,
+ /\s*,\s*/]
].each do |enable_regex, regex_field, delimiter|
if settings.key?(regex_field) || settings.key?(enable_regex)
regexp = Setting.send("#{enable_regex}?")