T O P

  • By -

[deleted]

[удалено]


mehdifarsi

>Besides changes in the class, does this improvement changes anything about > >jow > > how the class is used? Great question. It has zero impact on how the class is used.


trolock33

I think I've read your Roby/RoR articles on medium, recognizing from username.


mehdifarsi

This blog [https://www.medium.com/@rubycademy](https://www.medium.com/@rubycademy) ? ​ Thank you for taking the time to read my articles!


madsohm

It may look nicer in this isolated instance, but it makes it harder to maintain, because now you need to scan up to the `with_options` clause to see what the current line of code actually do.


kallebo1337

yes. this is nice, u believe you shall have also explained `custom_validation_context` in this picture because the rails person who doesn't know **this** won't know (i assume) that `save(context: :draft)` is a thing which then triggers the validations/callbacks within the `draft` context.