if options.fetch(:validations, true)
validates_confirmation_of :password, if: :should_confirm_password?
validates_presence_of :password, on: :create
validates_presence_of :password_confirmation, if: :should_confirm_password?
before_create { raise "Password digest missing on new record" if password_digest.blank? }
end
if: :should_confirm_password?是什么意思啊?有这种语法吗?