mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-05 07:01:30 +00:00
code cleanup: rubocop: fix Layout/EmptyLinesAroundBlockBody in app/models/setting.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18559 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a8c1fc77ef
commit
ca411ddca7
@ -180,7 +180,6 @@ Layout/EmptyLinesAroundArguments:
|
||||
# SupportedStyles: empty_lines, no_empty_lines
|
||||
Layout/EmptyLinesAroundBlockBody:
|
||||
Exclude:
|
||||
- 'app/models/setting.rb'
|
||||
- 'db/schema.rb'
|
||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||
- 'test/functional/issues_controller_test.rb'
|
||||
|
||||
@ -150,11 +150,9 @@ 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*/]
|
||||
].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)
|
||||
@ -171,7 +169,6 @@ class Setting < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.key?(:mail_from)
|
||||
begin
|
||||
mail_from = Mail::Address.new(settings[:mail_from])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user