I have two models. User and Account as follows
class Account < ActiveRecord::Base
has_many :manages
has_many :users, :through => :manages
end
class User < ActiveRecord::Base
has_many :manages
has_many :accounts, :through => :manages
end
If I were to use the rails console and create an instance of account by
acc = usr.accounts.build
acc.save
The following command would return the account instance created
usr.accounts
But the following command would not return the user instance
acc.users
Also when I look at the Join table, there is no entry created. What am missing here? I thought by using the build method that it automatically creates the join model entry.