I have problems with getting a has_many through association to work.
I keep getting this exception:
Article.find(1).warehouses.build
Act
You would need to add
has_many :entries
To each model, and above has_many :through, like this:
class Article < ActiveRecord::Base
has_many :entries
has_many :warehouses, :through => :entries
end
class Warehouse < ActiveRecord::Base
has_many :entries
has_many :articles, :through => :entries
end
More detailed tutorial on how to handle view and controllers https://kolosek.com/rails-join-table/