Skip to content

Rails 3.2.13 problems with has_many_through relationships #12

@tilo

Description

@tilo

In Rails 3.2.13 I'm experiencing problems when trying to use tableless models as
one side of a has_many_through relationship

  class List < ActiveRecord::Base
     # persisted model
     has_many :memberships
     has_many :items , :through => :memberships
   ...
  end

  class Item < ActiveRecord::Base
    has_no_table :database => :pretend_success

    has_many :memberships
    has_many :lists , :through => :memberships

    ...
  end

  class Mermbership < ActiveRecord::Base
    # persisted model / join model
    belongs_to :list
    belongs_to :item
  end

  l = List.first
  l.items
  (Object doesn't support #inspect)

 l.items.class
 NoMethodError: undefined method 'supports_explain?' for #<Object:...>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions