I have two model User
,Admin
every model make login
admin.rb
class Admin < ApplicationRecord
has_many :user
end
user.rb
class User < ApplicationRecord
belongs_to :admin
end
if already User model can also have many of master
how to add this in models
Aucun commentaire:
Enregistrer un commentaire