From babbc1580da9e4a23921ab68d47c7c0d2e8447da Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Thu, 11 Sep 2008 22:38:20 +0200 Subject: Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski [#1029 state:committed] --- .../lib/active_support/core_ext/string/behavior.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/string/behavior.rb (limited to 'activesupport/lib/active_support/core_ext/string/behavior.rb') diff --git a/activesupport/lib/active_support/core_ext/string/behavior.rb b/activesupport/lib/active_support/core_ext/string/behavior.rb new file mode 100644 index 0000000000..a93ca3027f --- /dev/null +++ b/activesupport/lib/active_support/core_ext/string/behavior.rb @@ -0,0 +1,13 @@ +module ActiveSupport #:nodoc: + module CoreExtensions #:nodoc: + module String #:nodoc: + module Behavior + # Enable more predictable duck-typing on String-like classes. See + # Object#acts_like?. + def acts_like_string? + true + end + end + end + end +end \ No newline at end of file -- cgit v1.2.3