Skip to content

Request: foreign key support #236

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

Closed
noinkling opened this issue Mar 12, 2015 · 2 comments
Closed

Request: foreign key support #236

noinkling opened this issue Mar 12, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@noinkling
Copy link

Now that Rails (>4.2) has support for database foreign keys, it would be nice to have an option for seeing these in the annotations.

@noinkling
Copy link
Author

ActiveRecord::Base.connection.supports_foreign_keys? can be used to check if the db supports them (I think only sqlite doesn't), then ActiveRecord::Base.connection.foreign_keys("table_name") can be used to get the collection of them for any particular table.

@frank-lsf
Copy link

+1 would be really convenient!

@ctran ctran added the feature label Mar 27, 2015
@ctran ctran added this to the v2.6.9 milestone Mar 27, 2015
@ctran ctran self-assigned this Mar 27, 2015
@ctran ctran closed this as completed May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants