diff options
author | Ivan Antropov <antropov.ivan@gmail.com> | 2013-11-09 10:16:19 +0700 |
---|---|---|
committer | Ivan Antropov <antropov.ivan@gmail.com> | 2013-11-09 10:16:19 +0700 |
commit | fcb00d388c8afe25cdc8bd0fa5c762840921a8c9 (patch) | |
tree | dd6f888849febb205c602859482598affbe0ccb2 /lib/arel/nodes/sql_literal.rb | |
parent | 9e53488b1d8d535182a989bd38fbb171aebbeef5 (diff) | |
download | rails-fcb00d388c8afe25cdc8bd0fa5c762840921a8c9.tar.gz rails-fcb00d388c8afe25cdc8bd0fa5c762840921a8c9.tar.bz2 rails-fcb00d388c8afe25cdc8bd0fa5c762840921a8c9.zip |
Add :encode_with for proper YAML serialization
Diffstat (limited to 'lib/arel/nodes/sql_literal.rb')
-rw-r--r-- | lib/arel/nodes/sql_literal.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/nodes/sql_literal.rb b/lib/arel/nodes/sql_literal.rb index 1bae8c9366..b43288b29c 100644 --- a/lib/arel/nodes/sql_literal.rb +++ b/lib/arel/nodes/sql_literal.rb @@ -5,6 +5,10 @@ module Arel include Arel::Predications include Arel::AliasPredication include Arel::OrderPredications + + def encode_with(coder) + coder.scalar = self.to_s + end end class BindParam < SqlLiteral |