granite icon indicating copy to clipboard operation
granite copied to clipboard

create and update should be able to take a hash

Open watzon opened this issue 5 years ago • 3 comments

Seeing as they takes the **args and converts it into a hash anyway, it would be ideal if they could just take a hash.

watzon avatar May 28 '20 06:05 watzon

Related: #370.

Blacksmoke16 avatar May 28 '20 12:05 Blacksmoke16

Wait, am I stupid? The create and update methods just pass the **args into create(args.to_h) and update(args.to_h), so they must already be available in a form that takes a hash, right?

watzon avatar May 28 '20 14:05 watzon

@watzon makes total sense to me, I would expect this kind of behavior since it makes creating objects from data you collect during run-time.

crimson-knight avatar Apr 25 '23 13:04 crimson-knight