Q:

Rails has_many :through, undefined method

having some trouble with a many to many relationship in rails. I have three modals: 

Order
Item
Itemized

An order has many items through itemized and vice-versa.
Querying Item.find(1).orders works fine, but when I try Order.find(1).items It returns:
NoMethodError: undefined method `items' for #<Order:0x007fcad3bb3258>

Here's my code:
Schema.rb
create_table "itemizeds", force: :cascade do |t|
  t.integer  "item_id",    limit: 4
  t.integer  "order_id",   limit: 4
  t.integer  "quantity",   limit: 4
  t.datetime "created_at",           null: false
  t.datetime "updated_at",           null: false
end

create_table "items", force: :cascade do |t|
  t.string   "title",      limit: 255
  t.datetime "created_at",             null: false
  t.datetime "updated_at",             null: false
end

create_table "orders", force: :cascade do |t|
  t.integer  "customer_id", limit: 4
  t.integer  "store_id",    limit: 4
  t.integer  "order_id",    limit: 4
  t.datetime "created_at",                                    null: false
  t.datetime "updated_at",                                    null: false
  t.decimal  "price",                 precision: 8, scale: 2
  t.decimal  "discount",              precision: 8, scale: 2
end

Order.rb (model)
class Order < ActiveRecord::Base
  has_many :itemized
  has_many :items, :through => :itemized
end

Item.rb (model)
class Item < ActiveRecord::Base
  has_many :itemized
  has_many :orders, :through => :itemized
end

Itemized.rb (model)
class Itemized < ActiveRecord::Base
  belongs_to :item
  belongs_to :order
end

Not sure if maybe it's interfering, but there's also a store model, and a store has many orders.
Thanks for your help and time!

A:

If I look at many to many associations in http://guides.rubyonrails.org/association_basics.html I see
class Physician < ActiveRecord::Base
  has_many :appointments
  has_many :patients, through: :appointments
end

class Appointment < ActiveRecord::Base
  belongs_to :physician
  belongs_to :patient
end

class Patient < ActiveRecord::Base
  has_many :appointments
  has_many :physicians, through: :appointments
end

So I suppose it is a problem of pluralisation. Try :through => :itemizeds instead.

