amistad
amistad copied to clipboard
Wrong number of arguments (3 for 2)
I have installed amistad and after the installation when I'm unable to start the server as it giving an error.
/home/mohd.hussain/.rvm/gems/ruby-1.9.3-p484@partyapp/gems/activerecord-3.2.14/lib/active_record/associations.rb:1197:in has_many': wrong number of arguments (3 for 2) (ArgumentError) from /home/mohd.hussain/.rvm/gems/ruby-1.9.3-p484@partyapp/gems/amistad-0.10.2/lib/amistad/active_record_friend_model.rb:14:in
block in module:ActiveRecordFriendModel'
from /h
I'm using ruby - 1.9.3 and rails 3.2.14
What am I doing wrong
I believe this is an incompatibility between Rails 3.2 and this has_many
statement:
has_many :pending_invited, -> { where(:'friendships.pending' => true, :'friendships.blocker_id' => nil) }, :through => :friendships, :source => :friend
This problem can be avoided by downgrading to version 0.9.2.