I am working on a multistep form. I started with this:
attr_writer :current_step
validates :EULA, acceptance: true,
if: -> { current_step == "paymentoptions" }
which validates, when I am on a certain step of my process. But I need to add conditionality. I tried something like this
attr_writer :current_step
attr_accessor :payment
validates :EULA, acceptance: true,
if: -> { current_step == "paymentoptions" && :payment == "Credit card" or "Wire transfer" }
Why does this lambda not work? What am I doing wrong?
Thank you very much in advance.