diff options
author | Konstantinos Rousis <rousisk@gmail.com> | 2015-04-01 16:03:41 +0200 |
---|---|---|
committer | Konstantinos Rousis <rousisk@gmail.com> | 2015-04-01 16:03:41 +0200 |
commit | 8f092302aaf065390ccf05429507b43fd5eadcb3 (patch) | |
tree | 0d188fb00d25ba8bea81cc3864db5e56757ba3cd /guides/source | |
parent | 69881fb03be8be5fa1cb56bb7a591006ec2becc3 (diff) | |
download | rails-8f092302aaf065390ccf05429507b43fd5eadcb3.tar.gz rails-8f092302aaf065390ccf05429507b43fd5eadcb3.tar.bz2 rails-8f092302aaf065390ccf05429507b43fd5eadcb3.zip |
[ci skip] fix guides example on arbitrary SQL execution
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_migrations.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index de8bbc4174..7a994cc5de 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -501,7 +501,7 @@ If the helpers provided by Active Record aren't enough you can use the `execute` method to execute arbitrary SQL: ```ruby -Product.connection.execute('UPDATE `products` SET `price`=`free` WHERE 1') +Product.connection.execute("UPDATE products SET price = 'free' WHERE 1=1") ``` For more details and examples of individual methods, check the API documentation. |