Use lambda form in model scopes (#12499)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10949 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Baptiste Barth
2012-12-07 10:12:47 +00:00
parent 8201761e77
commit 4896d5c7e8
12 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -79,9 +79,9 @@ class Issue < ActiveRecord::Base
{:conditions => ["#{IssueStatus.table_name}.is_closed = ?", is_closed], :include => :status}
}
scope :recently_updated, :order => "#{Issue.table_name}.updated_on DESC"
scope :on_active_project, :include => [:status, :project, :tracker],
:conditions => ["#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"]
scope :recently_updated, lambda { { :order => "#{Issue.table_name}.updated_on DESC" } }
scope :on_active_project, lambda { { :include => [:status, :project, :tracker],
:conditions => ["#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"] } }
before_create :default_assign
before_save :close_duplicates, :update_done_ratio_from_issue_status, :force_updated_on_change