./lib/ambition/processor.rb in ambition-0.1.4 vs ./lib/ambition/processor.rb in ambition-0.1.5
- old
+ new
@@ -4,11 +4,10 @@
class Processor < SexpProcessor
include ActiveRecord::ConnectionAdapters::Quoting
attr_reader :key, :join_string, :prefix, :includes
-
def initialize
super()
@strict = false
@expected = String
@auto_shift_type = true
@@ -49,9 +48,13 @@
case value.to_s
when 'true' then '1'
when 'false' then '0'
else ActiveRecord::Base.connection.quote(value) rescue quote(value)
end
+ end
+
+ def quote_column_name(value)
+ ActiveRecord::Base.connection.quote_column_name(value) rescue value.to_s
end
def extract_includes(receiver, method)
return unless receiver.first == :call && receiver[1].last == @receiver