Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Rails compatibility issue (regression error)

#24

When using a string instead of its symbol for comparison, the comportement of ar-extensions is different : it raises an error (as "nil" value isn't pushed) if a string is used.

Example

Testing
=>Testing(id: integer, name: string, parent_id: integer, lft: integer, rgt: integer) Testing.find(:all, :conditions => {:name=>nil})
=> [] Testing.find(:all, :conditions => {"name"=>nil})
ActiveRecord::PreparedStatementInvalid: wrong number of bind variables (0 for 1) in: testings.name is ?
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2399:in raise_if_bind_arity_mismatch' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2351:inreplace_bind_variables' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2342:in sanitize_sql_array' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2235:insanitize_sql_orig' from /home/my_application/vendor/plugins/ar-extensions/ar-extensions/lib/ar-extensions/finders.rb:37:in sanitize_sql' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1499:inmerge_conditions' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1497:in each' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1497:inmerge_conditions' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1809:in add_conditions!' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1692:inconstruct_finder_sql' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1553:in find_every' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:615:infind_without_default_options' from /home/my_application/vendor/plugins/my_extensions/lib/default_finder.rb:22:in find' from (irb):15 from :0

Reported by GaĆ«l SECHAUD · May 27th, 2009 @ 09:28 AM

State: new
Milestone: none
Assigned to: Zach Dennis Zach Dennis

Activity

  1. Simple Jack
    Simple Jack

    I don't know what these codes are about. I didn't even know why I am here in this forum. All I know is I love to play gacha life lunime on my PC. It is an anime themed life simulator game, you can dress up your character the way you want, you can even chat with other players around the world if you reached a certain level. Also, I know how to get pokemon go on pc. You can get it using the link I provided.

    September 13th, 2020 @ 07:06 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.