Replaced find(:all,...) with .all(...) while we are at it because

it will be deprecated
pull/6827/head
Sebastian Schuster 12 years ago
parent f531515058
commit e6a1ee33b5
  1. 6
      app/controllers/hourly_rates_controller.rb

@ -20,7 +20,7 @@ class HourlyRatesController < ApplicationController
if @project
return deny_access unless User.current.allowed_to?(:view_hourly_rates, @project, :for => @user)
@rates = HourlyRate.find(:all,
@rates = HourlyRate.all(
:conditions => { :user_id => @user, :project_id => @project },
:order => "#{HourlyRate.table_name}.valid_from desc")
else
@ -41,7 +41,7 @@ class HourlyRatesController < ApplicationController
end
if @project.nil?
@rates = DefaultHourlyRate.find(:all,
@rates = DefaultHourlyRate.all(
:conditions => {:user_id => @user},
:order => "#{DefaultHourlyRate.table_name}.valid_from desc")
@rates << @user.default_rates.build({:valid_from => Date.today}) if @rates.empty?
@ -76,7 +76,7 @@ class HourlyRatesController < ApplicationController
end
else
if @project.nil?
@rates = DefaultHourlyRate.find(:all,
@rates = DefaultHourlyRate.all(
:conditions => {:user_id => @user},
:order => "#{DefaultHourlyRate.table_name}.valid_from desc")
@rates << @user.default_rates.build({:valid_from => Date.today}) if @rates.empty?

Loading…
Cancel
Save