summaryrefslogtreecommitdiffstats
path: root/app/models/setting.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-03-03 04:32:16 +0000
committerGo MAEDA <maeda@farend.jp>2018-03-03 04:32:16 +0000
commit6233ebd71e1ae966f72078b5defc97c2dec8d343 (patch)
tree1310522e4d5fb30bd2a5bf2cada22b2fa4118b5d /app/models/setting.rb
parent76f12c1316ebcf93bc86ccd449b6032c378cc760 (diff)
downloadredmine-6233ebd71e1ae966f72078b5defc97c2dec8d343.tar.gz
redmine-6233ebd71e1ae966f72078b5defc97c2dec8d343.zip
Fix indent (#27025).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@17226 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/setting.rb')
-rw-r--r--app/models/setting.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb
index d66470d0a..fa04f1c1a 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -147,22 +147,22 @@ class Setting < ActiveRecord::Base
[: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}?")
- if settings.key?(enable_regex)
- regexp = settings[enable_regex].to_s != '0'
- end
- if regexp
- settings[regex_field].to_s.split(delimiter).each do |value|
- begin
- Regexp.new(value)
- rescue RegexpError => e
- messages << [regex_field, "#{l('activerecord.errors.messages.not_a_regexp')} (#{e.message})"]
+ if settings.key?(regex_field) || settings.key?(enable_regex)
+ regexp = Setting.send("#{enable_regex}?")
+ if settings.key?(enable_regex)
+ regexp = settings[enable_regex].to_s != '0'
+ end
+ if regexp
+ settings[regex_field].to_s.split(delimiter).each do |value|
+ begin
+ Regexp.new(value)
+ rescue RegexpError => e
+ messages << [regex_field, "#{l('activerecord.errors.messages.not_a_regexp')} (#{e.message})"]
+ end
end
end
end
end
- end
messages
end