search for: sanitize_sql_array

Displaying 2 results from an estimated 2 matches for "sanitize_sql_array".

2014 May 05
0
Why is Sanitizing SQL Fragments so Highly Muddled?
...ng straight to the database is easier than going through ActiveRecord (for instance: odd calculations being performed or large sets of data being returned that don't need to be instantiated into AR models). I can't find an easy or accepted way to bind variables in a custom SQL clause. sanitize_sql_array is protected, so you would have to call it with send(), which just feels dirty. ActiveRecord::Base.connection.quote() doesn't play well with dates. Am I missing a function that let's me use placeholders like the ActiveRecord where() with my plain SQL clauses? If not, has this been a s...
2007 Aug 06
4
problem with rails_root
...ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1427:in `gsub'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1427:in `replace_bind_variables'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1416:in `sanitize_sql_array'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1387:in `sanitize_sql'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/acti...