]> source.dussan.org Git - redmine.git/commitdiff
add empty line after guard clause to app/models/project.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 3 Nov 2020 14:55:57 +0000 (14:55 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 3 Nov 2020 14:55:57 +0000 (14:55 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20237 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 839e39a28d8b6471de0acfffe0bf1ff1050dd403..48d59019b20d184aa6da5007d5c3e90969ef84f6 100644 (file)
@@ -319,6 +319,7 @@ class Project < ActiveRecord::Base
     if args.first && args.first.is_a?(String) && !/^\d*$/.match?(args.first)
       project = find_by_identifier(*args)
       raise ActiveRecord::RecordNotFound, "Couldn't find Project with identifier=#{args.first}" if project.nil?
+
       project
     else
       super
@@ -386,6 +387,7 @@ class Project < ActiveRecord::Base
         exists?
       return false
     end
+
     Project.transaction do
       archive!
     end
@@ -411,6 +413,7 @@ class Project < ActiveRecord::Base
   # by the current user
   def allowed_parents(user=User.current)
     return @allowed_parents if @allowed_parents
+
     @allowed_parents = Project.allowed_to(user, :add_subprojects).to_a
     @allowed_parents = @allowed_parents - self_and_descendants
     if user.allowed_to?(:add_project, nil, :global => true) || (!new_record? && parent.nil?)
@@ -701,6 +704,7 @@ class Project < ActiveRecord::Base
       # No write action allowed on closed projects
       return false
     end
+
     # No action allowed on disabled modules
     if action.is_a? Hash
       allowed_actions.include? "#{action[:controller]}/#{action[:action]}"
@@ -801,8 +805,8 @@ class Project < ActiveRecord::Base
     if attrs.respond_to?(:to_unsafe_hash)
       attrs = attrs.to_unsafe_hash
     end
-
     return unless attrs.is_a?(Hash)
+
     attrs = attrs.deep_dup
 
     @unallowed_parent_id = nil
@@ -979,6 +983,7 @@ class Project < ActiveRecord::Base
       project.wiki.pages.each do |page|
         # Skip pages without content
         next if page.content.nil?
+
         new_wiki_content = WikiContent.new(page.content.attributes.dup.except("id", "page_id", "updated_on"))
         new_wiki_page = WikiPage.new(page.attributes.dup.except("id", "wiki_id", "created_on", "parent_id"))
         new_wiki_page.content = new_wiki_content
@@ -1135,6 +1140,7 @@ class Project < ActiveRecord::Base
       # inherited roles will be added when copying the group membership
       role_ids = member.member_roles.reject(&:inherited?).collect(&:role_id)
       next if role_ids.empty?
+
       new_member.role_ids = role_ids
       new_member.project = self
       self.members << new_member