mardi 16 mai 2017

How to use multiple cases in ruby

  case value and filter
    when "sale", "with"

    when "rent", "with"

    when "sale", "without"

    when "rent", "without"

  end

In the above statement it doesnt throw error but fail to work as expected. the case value is not accounted.

Is there any tweek to use multiple cases. here, I need to account both "value" and "filter"

Aucun commentaire:

Enregistrer un commentaire