]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup: removed the obsolete with_limit scope.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 27 Aug 2012 10:54:01 +0000 (10:54 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 27 Aug 2012 10:54:01 +0000 (10:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10243 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb
app/views/my/blocks/_issueswatched.html.erb

index 7807d2859a569fd287607f0fff9cde10916cbdd7..c7358c0e5daddfc6896f6799ac35e307d15f4d4a 100644 (file)
@@ -70,7 +70,6 @@ class Issue < ActiveRecord::Base
   }
 
   scope :recently_updated, :order => "#{Issue.table_name}.updated_on DESC"
-  scope :with_limit, lambda { |limit| { :limit => limit} }
   scope :on_active_project, :include => [:status, :project, :tracker],
                             :conditions => ["#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"]
 
index e34c4bad7d1bfb2d74cffd33e90075d792a47562..6bc31ae371b3b8d2231be7d9c57fab5525849354 100644 (file)
@@ -1,5 +1,5 @@
 <h3><%=l(:label_watched_issues)%> (<%= Issue.visible.watched_by(user.id).count %>)</h3>
-<% watched_issues = Issue.visible.on_active_project.watched_by(user.id).recently_updated.with_limit(10) %>
+<% watched_issues = Issue.visible.on_active_project.watched_by(user.id).recently_updated.limit(10) %>
 
 <%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
 <% if watched_issues.length > 0 %>