This specific line in my model
validates :password,
length: { minimum: 8 },
allow_nil: true,
on: :create,
unless: (:uid.present? && :provider.present?)
is causing
NoMethodError (undefined method `validate' for true:TrueClass)
and no errors during update_user.
Is there any syntax mistake? maybe something like the arguments are not sent properly or is it something else?
This error is occuring becuase of
unless: (:uid.present? && :provider.present?)
so replace it with
unless: Proc.new{|u| u.uid.present? && u.provider.present?}
and it will work.
Let me know if you are still facing the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With