On Nov 17, 7:11 am, MaD <[email protected]> wrote: > ArgumentError: wrong number of arguments (1 for 0) > from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/ > active_record/connection_adapters/mysql_adapter.rb:226:in `kind_of?'
There's clearly some sort of collision going on between an attribute method and the built-in definition of kind_of? - every Ruby object defines the one-argument form, so the fact that it's finding a 0- argument version is a sign. Somewhat unrelated, but you may want to declare these kind of flag associations using bind variables; it's not strictly necessary, but it's good practice to ensure cross-DB compatibility. In other words, use this: :conditions => ["is_admin = ? AND pending = ?", true, false] Otherwise, you may get weird errors when you switch your DB (to, for example, an in-memory SQLite3 for test speed) and the new DB doesn't escape booleans the same way. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.

