aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2018-03-06 02:53:28 +0100
committerXavier Noria <fxn@hashref.com>2018-03-06 02:54:33 +0100
commit958a37947ab05599a3f89f290a9360e0d40545dc (patch)
tree627c1f8b56379eb052af2c3d561a5f4f5d702bbc /activerecord
parent207536c063d011ae6554fec3f50037eebf59387c (diff)
downloadrails-958a37947ab05599a3f89f290a9360e0d40545dc.tar.gz
rails-958a37947ab05599a3f89f290a9360e0d40545dc.tar.bz2
rails-958a37947ab05599a3f89f290a9360e0d40545dc.zip
update comment to reflect new supported patterns [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index 122140eb55..7db9bbe46b 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -175,8 +175,12 @@ module ActiveRecord
# Regexp whitelist. Matches the following:
# "#{table_name}.#{column_name}"
# "#{table_name}.#{column_name} #{direction}"
+ # "#{table_name}.#{column_name} #{direction} NULLS FIRST"
+ # "#{table_name}.#{column_name} NULLS LAST"
# "#{column_name}"
# "#{column_name} #{direction}"
+ # "#{column_name} #{direction} NULLS FIRST"
+ # "#{column_name} NULLS LAST"
COLUMN_NAME_ORDER_WHITELIST = /
\A
(?:\w+\.)?