Obromios
Obromios

Reputation: 16393

Wrong number of arguments error when upgrading to rails t

When upgrading to Rails 5, I am seeing the following error whenever a model is saved.

   ArgumentError: wrong number of arguments (2 for 1)
from /Users/Chris/.rvm/gems/ruby-2.2.2@golf_mentor_5_0_0/gems/polyamorous-1.2.0/lib/polyamorous/activerecord_4.2_ruby_2/join_dependency.rb:56:in `join_constraints'

How do I fix this?

Upvotes: 1

Views: 153

Answers (1)

Obromios
Obromios

Reputation: 16393

This is problem caused by using an old version of the polyamorous gem. It was fixed by inserting the following into the Gemfile

gem 'polyamorous', '~> 1.3.1'

and then bundle update polyamorous.

Upvotes: 1

Related Questions