lib/saml/authn_request.rb in libsaml-3.0.2 vs lib/saml/authn_request.rb in libsaml-3.0.3

- old
+ new

@@ -14,10 +14,12 @@ attribute :provider_name, String, :tag => "ProviderName" has_one :requested_authn_context, Saml::Elements::RequestedAuthnContext validates :force_authn, :inclusion => [true, false, nil] - validates :assertion_consumer_service_index, :numericality => true, :if => "assertion_consumer_service_index.present?" + validates :assertion_consumer_service_index, :numericality => true, :if => lambda { |val| + val.assertion_consumer_service_index.present? + } validate :check_assertion_consumer_service def assertion_url return assertion_consumer_service_url if assertion_consumer_service_url