Developing rails 4 application
where password is not compulsory
validates :password, length: { in: 4..20 }, on: :create, :if => :check_provider
def check_provider
!self.provider.nil?
end
I put condition as you saw in above code but still error for required password.
What is wrong and how to apply password blank allow when provider is not nil.
Thanks