diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-10 17:11:02 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-10 17:11:02 -0800 |
commit | 1dfe62640fc754903ba1c19d4fed3604b9069196 (patch) | |
tree | d706a1bded1a0d4f918452ae5fcc175ec7be4c1c /lib | |
parent | 03f51687e204f03cdf8d8395350d4d0514a7f620 (diff) | |
parent | fcb00d388c8afe25cdc8bd0fa5c762840921a8c9 (diff) | |
download | rails-1dfe62640fc754903ba1c19d4fed3604b9069196.tar.gz rails-1dfe62640fc754903ba1c19d4fed3604b9069196.tar.bz2 rails-1dfe62640fc754903ba1c19d4fed3604b9069196.zip |
Merge pull request #216 from iantropov/issue_yaml
Add :encode_with to sql_literal for proper YAML serialization
Diffstat (limited to 'lib')
-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 |