diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2011-03-25 22:30:36 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2011-03-25 22:30:36 +0000 |
commit | 25be204e3c2c46b4eb7738daa0ac622738aa211b (patch) | |
tree | beb0faf134162f6f962bf9deff0ef65706e9422b /activerecord/lib/active_record | |
parent | 65dce01091ec88f3485ccc26f8799c609b91e7cc (diff) | |
download | rails-25be204e3c2c46b4eb7738daa0ac622738aa211b.tar.gz rails-25be204e3c2c46b4eb7738daa0ac622738aa211b.tar.bz2 rails-25be204e3c2c46b4eb7738daa0ac622738aa211b.zip |
No arguments for first! and last!
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 <tt>find(:last, *args)</tt>. 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 <tt>find(:all, *args)</tt>. You can pass in all the |