These are chat archives for dry-rb/chat

22nd
Nov 2016
alexeymoshkin
@alexeymoshkin
Nov 22 2016 07:27

Hi there! How can I change property value, when form.validate depending on value of other property in this form
For example:

property :amount
property :type

if type == 'negative'
  amount = 0 - amount
end

Any solution?

Christopher Dennl-Ortega Arrieta
@cdennl
Nov 22 2016 07:30
@alexeymoshkin high level rules, look in the docs
alexeymoshkin
@alexeymoshkin
Nov 22 2016 07:31
@cdennl thanks, I will try
Martín Fernández
@bilby91
Nov 22 2016 15:10
This message was deleted
Martín Fernández
@bilby91
Nov 22 2016 16:20
It it possible to use AutoInject in a rails concern ?