Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has_one and polymorphic association #2291

Open
quolpr opened this issue May 5, 2015 · 3 comments
Open

has_one and polymorphic association #2291

quolpr opened this issue May 5, 2015 · 3 comments

Comments

@quolpr
Copy link

quolpr commented May 5, 2015

I have models:

class Car::Rim::Rim < ActiveRecord::Base
  belongs_to :param, polymorphic: true
end
class Car::Rim::EquipParam < ActiveRecord::Base
  has_one :rim, as: :param
end
class Car::Rim::CarParam < ActiveRecord::Base
  has_one :rim, as: :param
end

For Car::Rim::EquipParam or Car::Rim::CarParam selection form of rim does not appear. But if association will be "has_many" - all will be fine.

@ferrisoxide
Copy link

Has there been any movement on this? I have exactly the same issue and not sure how to resolve it

@bricesanchez
Copy link

I've the same issue, i think there is no news about it. I'm trying to see how to fix it and you ?

@rob99
Copy link

rob99 commented Feb 11, 2016

What if you configure:inverse_of ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants