Skip to content

Validation condition is reversed? #22

@m5rk

Description

@m5rk

The validator here:

https://github.com/zuorasc/zuora/blob/master/lib/zuora/objects/product_rate_plan_charge.rb#L33

appears to be the opposite of what's intended. I would expect:

validates_numericality_of :included_units, if: Proc.new { |prpc| INCLUDED_UNITS.include?(prpc.charge_model) }

That is, only validate the numericality of :included_units if the charge model is in the INCLUDED_UNITS list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions