diff options
author | Juanjo Bazán <jjbazan@gmail.com> | 2012-09-25 00:59:07 +0200 |
---|---|---|
committer | Juanjo Bazán <jjbazan@gmail.com> | 2012-10-28 22:18:45 +0100 |
commit | 300d080ada31ac297264e6abba6ca16cd2db5925 (patch) | |
tree | 253d70f1bfc68985181c1f683444c5918a6550f1 /activerecord/lib/active_record | |
parent | 35ca953a27124bd6dcd7aef8a62ffa27ccab83f1 (diff) | |
download | rails-300d080ada31ac297264e6abba6ca16cd2db5925.tar.gz rails-300d080ada31ac297264e6abba6ca16cd2db5925.tar.bz2 rails-300d080ada31ac297264e6abba6ca16cd2db5925.zip |
ActiveRecord::Relation#none! method.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 14bcb337e9..4fdc296c7e 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -496,6 +496,11 @@ module ActiveRecord extending(NullRelation) end + # Like #none, but modifies relation in place. + def none! + extending!(NullRelation) + end + # Sets readonly attributes for the returned relation. If value is # true (default), attempting to update a record will result in an error. # |