Skip to content

Instantly share code, notes, and snippets.

@speratus
Created December 5, 2019 14:11
Show Gist options
  • Save speratus/144e0d5657d865944d08a655b959ce9e to your computer and use it in GitHub Desktop.
Save speratus/144e0d5657d865944d08a655b959ce9e to your computer and use it in GitHub Desktop.
Custom column names in ActiveRecord Act 2 User class
class User < ActiveRecord::Base
has_many :user_recipes
has_many :recipes, through: :user_recipes
has_many :recipes
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment