diff options
author | Zachary Scott <e@zzak.io> | 2014-06-15 22:26:26 -0700 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-06-15 22:26:26 -0700 |
commit | 38d4ea7c9aeab9c719f20bb5ba39df29e970f341 (patch) | |
tree | 10bef1c98757990539425742c1f5fbc5d3ba00b0 /activerecord | |
parent | 6a25ddd2658595ec2bea6e092b3eba8209092b26 (diff) | |
parent | 513c69c7e1a9fbfc97592892326a110f27606133 (diff) | |
download | rails-38d4ea7c9aeab9c719f20bb5ba39df29e970f341.tar.gz rails-38d4ea7c9aeab9c719f20bb5ba39df29e970f341.tar.bz2 rails-38d4ea7c9aeab9c719f20bb5ba39df29e970f341.zip |
Merge pull request #15723 from akshay-vishnoi/sql-correction
[ci skip] Use `an` for SQL
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG.md | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/sanitization.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 6124518523..39c8769814 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -423,7 +423,7 @@ *Eric Chahin* -* `sanitize_sql_like` helper method to escape a string for safe use in a SQL +* `sanitize_sql_like` helper method to escape a string for safe use in an SQL LIKE statement. Example: @@ -459,7 +459,7 @@ *Lauro Caetano* * Calling `delete_all` on an unloaded `CollectionProxy` no longer - generates a SQL statement containing each id of the collection: + generates an SQL statement containing each id of the collection: Before: diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb index 1aa93ffbb3..ff70cbed0f 100644 --- a/activerecord/lib/active_record/sanitization.rb +++ b/activerecord/lib/active_record/sanitization.rb @@ -107,7 +107,7 @@ module ActiveRecord end.join(', ') end - # Sanitizes a +string+ so that it is safe to use within a sql + # Sanitizes a +string+ so that it is safe to use within an SQL # LIKE statement. This method uses +escape_character+ to escape all occurrences of "\", "_" and "%" def sanitize_sql_like(string, escape_character = "\\") pattern = Regexp.union(escape_character, "%", "_") |