Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Allow model-based associations for belongs_to and has_one #3

Open
dmcinnes opened this issue Sep 26, 2014 · 1 comment
Open

Allow model-based associations for belongs_to and has_one #3

dmcinnes opened this issue Sep 26, 2014 · 1 comment
Labels

Comments

@dmcinnes
Copy link
Collaborator

Does it make sense to have model-based association on belongs_to and has_one like they are available on has_many

class API::V1::Post < Daylight::API
  has_one :blog, through: :association
  has_one :company, through: association
  has_many :comments, through: association # only one currently supported
end
@dmcinnes
Copy link
Collaborator Author

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

No branches or pull requests

1 participant