diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 20:51:46 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:32:42 +0300 |
commit | 75f5fa997de148c9bc0e5bd6e6f6050526a0b164 (patch) | |
tree | e2fd6db5b1190817c062a8df20018dd00be68ce0 /app/helpers/visibility_level_helper.rb | |
parent | 7d4b52b27dcbe30d85d4fad27e983cee51cf6677 (diff) |
Enable Rails/Delegate
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r-- | app/helpers/visibility_level_helper.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb index fc93acfe63e..169cedeb796 100644 --- a/app/helpers/visibility_level_helper.rb +++ b/app/helpers/visibility_level_helper.rb @@ -89,13 +89,9 @@ module VisibilityLevelHelper current_application_settings.restricted_visibility_levels || [] end - def default_project_visibility - current_application_settings.default_project_visibility - end - - def default_group_visibility - current_application_settings.default_group_visibility - end + delegate :default_project_visibility, + :default_group_visibility, + to: :current_application_settings def skip_level?(form_model, level) form_model.is_a?(Project) && !form_model.visibility_level_allowed?(level) |