We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86dbe4c commit 08e7847Copy full SHA for 08e7847
test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/QuotingTest.rb
@@ -4,3 +4,19 @@
4
exclude :test_do_not_raise_when_int_is_not_wider_than_64bit, comment
5
exclude :test_do_not_raise_when_raise_int_wider_than_64bit_is_false, comment
6
exclude :test_raise_when_int_is_wider_than_64bit, comment
7
+
8
+require "support/copy_cat"
9
10
+CopyCat.copy_methods(self, self,
11
+ :test_quote_big_decimal,
12
+ :test_quote_rational,
13
+ :test_quote_integer) do
14
+ def on_str(node)
15
+ return if defined?(@already_quoted)
16
+ @already_quoted = true
17
+ node => [:str, str]
18
+ return unless ["4.2", "3/4", "42"].include?(str)
19
20
+ replace(node.loc.expression, "'#{str}'".inspect)
21
+ end
22
+end
0 commit comments