]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated find_all_by_* at TimelogController#find_time_entries
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 10 Jan 2014 10:40:46 +0000 (10:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 10 Jan 2014 10:40:46 +0000 (10:40 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12603 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/timelog_controller.rb

index a8f4d53a6b3d395596b4719b38f9b371d4bd3cf8..f0563eda6af76b03a2fe8f0f1b75db795f5388f2 100644 (file)
@@ -232,7 +232,7 @@ private
   end
 
   def find_time_entries
-    @time_entries = TimeEntry.find_all_by_id(params[:id] || params[:ids])
+    @time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).all
     raise ActiveRecord::RecordNotFound if @time_entries.empty?
     @projects = @time_entries.collect(&:project).compact.uniq
     @project = @projects.first if @projects.size == 1