레일스 앱에서 내 Devise 사용자 모델에 표시된 행을 추가 한 후에는 웹 양식이나 Console에서 User.create()를 사용하여 더 이상 새 사용자를 만들 수 없습니다. 이 행을 주석 처리하면 모든 기능이 복원됩니다. 분명히 위의 내용과 매우 밀접하게 관련되어 있으므로 사용자를 대리점에 할당하도록 할 수 있습니다. 이 기능이 필요할 때마다 수정하거나 다른 방법으로 제안하는 방법이 있습니까?belongs_to 관계로 인해 개발자가 데이터베이스에 저장하지 않습니다
class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :registerable
has_many :tanks, dependent: :destroy
has_many :properties, dependent: :destroy
has_many :contacts, dependent: :destroy
has_many :stations
has_many :clients, :class_name => 'User', :foreign_key => :manager_id
belongs_to :dealer, :class_name => 'User' #<--- this one
end
아래 주어진 해결책을 시도하고 추가 안내를 위해 알려주십시오. – Gabbar