OSDN Git Service

scm: code clean up repositories controller.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 06:16:19 +0000 (06:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 06:16:19 +0000 (06:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5875 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/repositories_controller.rb

index 5d38f7e..b660408 100644 (file)
@@ -82,7 +82,10 @@ class RepositoriesController < ApplicationController
 
   def destroy
     @repository.destroy
-    redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
+    redirect_to :controller => 'projects',
+                :action     => 'settings',
+                :id         => @project,
+                :tab        => 'repository'
   end
 
   def show
@@ -204,7 +207,8 @@ class RepositoriesController < ApplicationController
         User.current.pref[:diff_type] = @diff_type
         User.current.preference.save
       end
-      @cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
+      @cache_key = "repositories/diff/#{@repository.id}/" + 
+                      Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
       unless read_fragment(@cache_key)
         @diff = @repository.diff(@path, @rev, @rev_to)
         show_error_not_found unless @diff