From dbf0c112767d0e719035b7e7df4b30154e88dfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Wed, 25 Jul 2012 15:18:55 +0200 Subject: [PATCH] PostgreSQL still doesn't implicitly order stuff --- features/step_definitions/cost_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/step_definitions/cost_steps.rb b/features/step_definitions/cost_steps.rb index 0cc125d90f..23cc35b3ac 100644 --- a/features/step_definitions/cost_steps.rb +++ b/features/step_definitions/cost_steps.rb @@ -38,7 +38,7 @@ Given /^there (?:is|are) (\d+) (default )?hourly rate[s]? with the following:$/ rate.reload.save! unless rate.project.nil? || User.find_by_login(value).projects.include?(rate.project) rate.save! - rate.update_attribute :project_id, User.find_by_login(value).projects.last.id + rate.update_attribute :project_id, User.find_by_login(value).projects(:order => "id ASC").last.id rate.reload.save! end rate.update_attribute :user_id, User.find_by_login(value).id