mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] fix guides example on arbitrary SQL execution
This commit is contained in:
parent
69881fb03b
commit
8f092302aa
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue