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

Active Record 关联中has_one中的foreign_key使用无效 #98

Open
tangwen0902 opened this issue Dec 14, 2017 · 0 comments
Open

Active Record 关联中has_one中的foreign_key使用无效 #98

tangwen0902 opened this issue Dec 14, 2017 · 0 comments

Comments

@tangwen0902
Copy link

https://ruby-china.github.io/rails-guides/association_basics.html#has-one-association-reference
当前使用的rails 4.2.1
按教程中在has_one中加foreign_key是不生效的,在belongs_to中加foreign_key才生效

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

1 participant