summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-26 14:47:00 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-26 14:47:00 +0000
commit98da3afcd29b328ad40293c02d961b5b795bd0ca (patch)
treea0fb7be47e05400d6f851e4ca4ee833a9fc41e6f
parentb96d4c06e5e9edf908ea0fd401bb97bad67bacb2 (diff)
downloadredmine-98da3afcd29b328ad40293c02d961b5b795bd0ca.tar.gz
redmine-98da3afcd29b328ad40293c02d961b5b795bd0ca.zip
add empty line after guard clause to app/models/group_builtin.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20503 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/group_builtin.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/group_builtin.rb b/app/models/group_builtin.rb
index 1054d9d86..90fb3424b 100644
--- a/app/models/group_builtin.rb
+++ b/app/models/group_builtin.rb
@@ -39,15 +39,18 @@ class GroupBuiltin < Group
class << self
def load_instance
return nil if self == GroupBuiltin
+
instance = unscoped.order('id').first || create_instance
end
def create_instance
raise 'The builtin group already exists.' if exists?
+
instance = unscoped.new
instance.lastname = name
instance.save :validate => false
raise 'Unable to create builtin group.' if instance.new_record?
+
instance
end
private :create_instance