Created
October 19, 2018 18:47
-
-
Save eserna27/2f7c4192c2939541fa998b5554d3940f to your computer and use it in GitHub Desktop.
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
class User < ActiveRecord::Base | |
has_many registereds, class_name: "Client" | |
end | |
class Client < ActiveRecord::Base | |
belongs_to registered_by, class_name: "User", foreign_key: "registrator_id" | |
end | |
schema.rb | |
client | |
registrator_id #user_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment