aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/sql_literal.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-26 13:32:25 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-26 13:32:25 -0700
commit3f1ab2b977d921ed7f6cd4ec2e9204b8ad22148e (patch)
tree181e0dc74c82d9d2f566978a4f33c3dc76112f1b /lib/arel/sql_literal.rb
parent87b2f70fe143ec2abab5f3831ade706b3cf8707e (diff)
downloadrails-3f1ab2b977d921ed7f6cd4ec2e9204b8ad22148e.tar.gz
rails-3f1ab2b977d921ed7f6cd4ec2e9204b8ad22148e.tar.bz2
rails-3f1ab2b977d921ed7f6cd4ec2e9204b8ad22148e.zip
removing more duplication
Diffstat (limited to 'lib/arel/sql_literal.rb')
-rw-r--r--lib/arel/sql_literal.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/arel/sql_literal.rb b/lib/arel/sql_literal.rb
new file mode 100644
index 0000000000..a98a9a058c
--- /dev/null
+++ b/lib/arel/sql_literal.rb
@@ -0,0 +1,13 @@
+module Arel
+ class SqlLiteral < String
+ def relation
+ nil
+ end
+
+ def to_sql(formatter = nil)
+ self
+ end
+
+ include Attribute::Expressions
+ end
+end