We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54de2c9 commit 30aa19dCopy full SHA for 30aa19d
lib/ajax-datatables-rails/base.rb
@@ -120,7 +120,7 @@ def build_conditions_for(query)
120
def search_condition(column, value)
121
model, column = column.split('.')
122
model = model.singularize.titleize.gsub( / /, '' ).gsub("/","::").constantize
123
- casted_column = ::Arel::Nodes::NamedFunction.new('CAST', [model.arel_table[column.to_sym].as('VARCHAR')])
+ casted_column = ::Arel::Nodes::NamedFunction.new('CAST', [::Arel::Nodes::SqlLiteral.new(model.arel_table[column.to_sym].as('VARCHAR').to_sql)])
124
casted_column.matches("%#{value}%")
125
end
126
0 commit comments