From 8f092302aaf065390ccf05429507b43fd5eadcb3 Mon Sep 17 00:00:00 2001 From: Konstantinos Rousis Date: Wed, 1 Apr 2015 16:03:41 +0200 Subject: [PATCH] [ci skip] fix guides example on arbitrary SQL execution --- guides/source/active_record_migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- GitLab