]> source.dussan.org Git - redmine.git/commitdiff
scm: code clean up app/models/changeset.rb.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Apr 2011 23:21:04 +0000 (23:21 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Apr 2011 23:21:04 +0000 (23:21 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5374 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/changeset.rb

index 869e9bad93f2ac06c52efc25eb02a29c55cfb1f8..b018090247e3651fde94b5f6089e35bea1711e10 100644 (file)
@@ -147,23 +147,29 @@ class Changeset < ActiveRecord::Base
       "r#{revision}"
     end
   end
-  
+
   # Returns the previous changeset
   def previous
-    @previous ||= Changeset.find(:first, :conditions => ['id < ? AND repository_id = ?', self.id, self.repository_id], :order => 'id DESC')
+    @previous ||= Changeset.find(:first,
+                    :conditions => ['id < ? AND repository_id = ?',
+                                    self.id, self.repository_id],
+                    :order => 'id DESC')
   end
 
   # Returns the next changeset
   def next
-    @next ||= Changeset.find(:first, :conditions => ['id > ? AND repository_id = ?', self.id, self.repository_id], :order => 'id ASC')
+    @next ||= Changeset.find(:first,
+                    :conditions => ['id > ? AND repository_id = ?',
+                                    self.id, self.repository_id],
+                    :order => 'id ASC')
   end
-  
+
   # Creates a new Change from it's common parameters
   def create_change(change)
-    Change.create(:changeset => self,
-                  :action => change[:action],
-                  :path => change[:path],
-                  :from_path => change[:from_path],
+    Change.create(:changeset     => self,
+                  :action        => change[:action],
+                  :path          => change[:path],
+                  :from_path     => change[:from_path],
                   :from_revision => change[:from_revision])
   end