aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations/length.rb
diff options
context:
space:
mode:
authorMichiaki Ariga <chezou+github@gmail.com>2016-02-18 17:49:57 +0900
committerMichiaki Ariga <chezou+github@gmail.com>2016-02-18 18:35:30 +0900
commit25dbfba26343f04f0eb978852ad0dc80a18aedc5 (patch)
tree74a5a49c12dea3ec210eeac193456a6321de7645 /activerecord/lib/active_record/validations/length.rb
parent00b62719b4ff4fe4e60b00ba46c03cc6209b1f40 (diff)
downloadrails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.tar.gz
rails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.tar.bz2
rails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.zip
Add assertions order by field with empty data
Add assertions to MySQL `ORDER BY FIELD()` with empty data. These tests examine to sanitize `ORDER BY FIELD()` with empty data appropriately. ```ruby Tag.order(['field(id, ?)', []]).to_sql # => SELECT "tags".* FROM "tags" ORDER BY field(id, NULL) Tag.order(['field(id, ?)', nil]).to_sql # => SELECT "tags".* FROM "tags" ORDER BY field(id, NULL) ```
Diffstat (limited to 'activerecord/lib/active_record/validations/length.rb')
0 files changed, 0 insertions, 0 deletions