From 25be204e3c2c46b4eb7738daa0ac622738aa211b Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 25 Mar 2011 22:30:36 +0000 Subject: No arguments for first! and last! --- activerecord/lib/active_record/relation/finder_methods.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record/relation') diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 9d4c6d60f5..d41a360821 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -124,8 +124,8 @@ module ActiveRecord end # Same as #first but raises RecordNotFound if no record is returned - def first!(*args) - self.first(*args) or raise RecordNotFound + def first! + self.first or raise RecordNotFound end # A convenience wrapper for find(:last, *args). You can pass in all the @@ -143,8 +143,8 @@ module ActiveRecord end # Same as #last but raises RecordNotFound if no record is returned - def last!(*args) - self.last(*args) or raise RecordNotFound + def last! + self.last or raise RecordNotFound end # A convenience wrapper for find(:all, *args). You can pass in all the -- cgit v1.2.3