1
저장되지 않습니다 : 제가 DB를 검색하고 테이블 authorization
검사 밖으로 세례반했다 tutorial루비 레일 권한 부여에 내가이 다음있어
user = User.new :name => auth_hash["user_info"]["name"], :email => auth_hash["user_info"]["email"]
user.authorizations.build :provider => auth_hash["provider"], :uid => auth_hash["uid"]
user.save
render :text => "Hi #{user.name}! You've signed up."
테이블이 비어 있습니다.
왜 그런가요?
편집 : 이 오류 얻을 :
Oops, something went wrong: ["Authorizations is invalid"]
이입니다 user.rb :
class Authorization < ActiveRecord::Base
belongs_to :user
validates :provider, :uid, :presence => true
attr_accessible :provider, :uid
end
사용자 모델을 게시하고'user.save'의 반환 값을 확인하십시오. 'true'가 아닌 경우 유효성 검사 오류가있을 수 있습니다. – Thilo