Created
August 20, 2012 06:34
-
-
Save bansalakhil/3401574 to your computer and use it in GitHub Desktop.
Edge Rails accepts a polymorphic modifier for references in migration generators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allow scaffold/model/migration generators to accept a polymorphic modifier for references/belongs_to, for instance | |
rails g model Product supplier:references{polymorphic} | |
will generate the model with belongs_to :supplier, polymorphic: true association and appropriate migration. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment