RailsCasts Pro episodes are now free!

Learn more or hide this

dgbarnes's Profile

GitHub User: dgbarnes

Comments by


I just added the squeel gem to the Gemfile in my project, did a bundle install and it installed without a problem. I then tried to use it with a very simple query like this:

InsertionOrder.where{id = 1}

in a controller and got

ArgumentError: wrong number of arguments (0 for 1+)

I tried the same query and many variations in the rails console and still got the same error.

InsertionOrder.where(id: 1) works just fine.

I saw that patrick above says restarting his session helped but it has for me on many restarts.

I've tried using several other operators and tried putting the expression in parentheses, but with no change in result.

I Tried doing the rake initialization to make the squeel.rb config file in case that would help but it didn't.

Any ideas?