Rails 3 migrations: Adding reference column?

If you are using the Rails 4.x you can now generate migrations with references, like this:

rails generate migration AddUserRefToProducts user:references

like you can see on rails guides

Leave a Comment