luckyframework/lucky_record

Add shortcut for setting field values and saving at the same time in Boxes

paulcsmith opened this issue · 1 comments

UserBox.save(name: "Hello", age: 32)

# Instead of
UserBox.new.name("Hello").age(32).save

Closing this. Going to stick with regular methods to keep things simple. This will also work once save/create works with a block

UserBox.create name: "Hello", age: 32
UserBox.create &.name("Hello").age(32)